Play music? If there's a USB port you may be able to. Depends on the software your BMW has. I know my ford syncs up iwth my ipod. Worse case, if your BMW has a headphone in port, you can get a male/male cable and hook the headphone out into the headphone in of your car. (which is honestly sometimes simpler than messing with software)
As to surfing, if your car is able to generate a wifi hotspot you can probably connect your iPad to that.
If you're asking about carplay, to the best of my knowledge there isn't yet a car out that supports that (the stuff on the apple site says new cars coming out this year)