Is it legal to share a CD with a friend so that he can put it on his ipod?

Yes Yes, this is called sharing. As long as you are not selling the music, you'll be fine. It's when you make music available to the masses that you could be in trouble.