If you actually buy the music on itunes,napster or any other service, and it's in a format your mp3 player can play, yes you can upload or burn the music on to a CD (itunes burn and rip), You own it, so you can do what you want with it.
The excepition to that rule is Rental Music Services, such as Napster or Raspody. When you rent the music, meaning you pay a low base fee and download an unlimited amount of music you can't do what you want with the music. On napster, which I use, they have DRM Protected music so it only works as long as you keep your subscription. After your subscription is up it will not work any longer since the music has to be updated every billing cycle, if it's not updated it doesn't work any longer. Since most rental music sites have DRM enabled music, you need to have a DRM capable mp3 player, a lot of players support DRM (Digital Rights Management), iPOD isn't one of them. Since they force you to use there own music services, Sony does the same.
So in short if you rent the music your limited to what you can do with the music since you don't own it your just renting it, if you own the music meaning you bought it then yes your free to do what you want with it.