Many people mistakenly believe that purchasing a CD gives them the right to burn the CD (make a copy) and pass it out to whomever they wish. This is not true. Burning CDs and giving them out is a violation of the copyright law that protects an artist from losing money on his work due to copyright infringement. There are, however, certain circumstances where burning a CD is legal.
A creative work in a fixed form is copyrighted by its creator upon creation and cannot be illegally used or reproduced in any way without written consent of the copyright owner. Copyright registration is available, but not required, through the United States Copyright Office. Registering a copyrighted work allows the copyright owner to pursue a copyright infringement suit in the event of infringement. Violating someone's copyright can result in large fines (depending upon what a court determines you have cost the copyright owner in lost income) and may even result in jail time.
If you purchase a music CD and want to burn a backup copy for yourself, this is permitted. That copy is strictly a backup in case something happens to the original you purchased. You cannot copy it for the purpose of giving it away or selling it. A copy made for the purpose of making a profit is illegal, but even giving it away costs the artist a possible sale, which means loss of income and copyright infringement.
Educational institutions purchasing the required amount of legal copies (which varies depending upon the copyright owner's terms) are allowed to make limited copies of a recording for the purpose of teaching. This can include one copy per instructor and a copy for students.
P2P software (peer to peer) is software that allows the transfer of files from one computer to another. Many times these files are music files. While P2P software is legal, using them to acquire music is not legal unless the company behind the software has paid for the rights to the music (not likely). It is illegal to obtain music files using P2P software, although people do it all the time. Many people burn these files to disc or transfer them to other people, effectively violating copyright law. Regardless of the fact that filesharing software is legal, using it for illegal purpose is punishable under copyright law.