How wifi/bluetooth speaker can get audio data?

This page on the Bluetooth specification website very quickly descends into technobabble, but the Advanced Audio Distribution Profile is how audio is distributed, or sent, from a Bluetooth audio transmitter (such as iPhone or iPod) to a Bluetooth audio receiver (such as headphones or a stand-alone speaker).

I am not sure how technical of an answer you are looking for, but the page linked above goes into much more detail.