P2P Sharing is the way that people illegally share music over the Internet. Though the idea of a service that allows people to share files is not legal, sharing copyrighted material over this means is illegal. You cannot purchase a CD, copy it and share it with anyone on a network. You can also not download a CD and allow others to download it from you. It is illegal to complete the act of downloading as well, but you cannot be prosecuted for downloading. You can be prosecuted for uploading items to share.
When you purchase a song from iTunes, Amazon or similar services, this is a legal download. You are purchasing the right to download the song, own it and play on up to five devices. Using this file on more than five devices (such as burning a CD, mp3 player, computer, etc.) and using it on more than that is illegal. Even burning CDs of the song for your friends (after five copies) is illegal.
Official music blogs offer free music downloads. These are legal because these publications have permission from the labels and music owners to provide the songs as downloads for readers. It is illegal to download these files and share them with other user , however. Often these downloads include a code you need from the magazine or newsletter to download.
Some bands and artists offer direct downloads of new songs or albums on their websites. This is legal because the band has copyright rights to this item. If you take the song and put it up on a P2P sharing website, this would be illegal. The only person who can use the file legally is the one who signed up to receive the file.