Most bareboat chartered sailboats with have a whole boat audio system that will look like your standard car stereo. Everyone has devices that have music on them these days. From your phone to tablet, computer and beyond, you should have something that has a 3.5mm headphone jack. There are two basic types of connectors on the boat, and then some have a CD player.
Connector type one is just a 3.5mm headphone jack input like the one found here at monoprice.
Connector type two is a pair of RCA plugs like this one
Both of those are very inexpensive at monoprice, and very expensive (in comparison) locally at Radioshack, Walmart and Home Depot.
If the boat you are chartering is older (than say 2008), there is a good chance you will have to burn CDs from your music. This is a pretty big pain… you may need a bunch of blanks and a laptop to burn them onto CDs.
An additional option is a FM transmitter. I have never had good luck with these though. The audio quality that comes out in comparison to a direct connection is pretty poor. There is always some kind of interference.
So far I haven’t seen a ‘head unit’ that will play burnt mp3s from CD, but I’m sure that is out there somewhere too.
[Edit] This trip we didn’t use the on board radio at all. One person brought a Jawbone Bluetooth Jambox which was awesome because lots of us have devices (computers, iPads, iPhones, android devices) with Bluetooth support. It has awesome sound.