I listen to music when I ride, but only on the highway and on trips over 1hr. I use sony EP-L something earphones, they actually work as earplugs (I use them as that with the music turned off) so I can both hear the music and save my hearing.
For perspective, our highways here are 1 lane in each direction, very empty and very straight. When I get into populated areas or more complex driving situations (more lanes, more intersecting roads or more twisty) I turn the music off and the plugs function just as earplugs.
Beginning riding, you really won't want the music. You'll probably feel like your travelling at lightspeed the first time you get up to highway/freeway speed and that can take awhile to get used to. If you're new, this is definately something I wouldn't worry about at this point, music only makes riding harder undeniably.