As a general rule of thumb, IT IS ILLEGAL TO COPY, SHARE, OR USE INFORMATION, IDEAS, OR CONTENT THAT SOMEONE ELSE CREATED without the creator's permission. This includes songs, pictures, videos, and writings, as well as any other intellectual property.
If you are taking files from or posting files to the internet, you need to be very aware of whether the information is copyrighted or whether it is in the public domain. YOU CAN BE SUED for a whole lot of money for copyright violation - this is an act of piracy.
There are some minor "loopholes" in the copyright system specifically designed to allow for fair use in educational settings, and which MIGHT allow for some sampling.
A (very sarcastic) song about copyright infringement
******Some terms you should know******
Copyright – The right to decide who gets to make/use copies of information or entertainment material. This is granted to a creator by the government under current law. Copyright currently lasts for the lifetime of the author plus seventy years. Creators generally allow the use of their intellectual property in exchange for money - when you buy an MP3 or a book, you have purchased the right to personally use that one copy. This purchase does not extend to sharing your copy or lending people copies - this is copyright violation - or making copies to give away or sell - this is piracy.
Copyright violation – Using copyrighted material without paying for it or without the permission of the copyright holder. This is illegal. It is also easy to do; if you purchase or rent entertainment (videos, songs, etc.) and share it with others, you are, technically, infringing on the copyright. If you make copies of the work to share with others, you are also violating the copyright, because you do not have the right to make copies to share with others (that's what a copyright is). Posting copyrighted material on a website for others to listen to/view/download is bootlegging and piracy.
Intellectual property - any original idea, whether it is expressed as written words, songs, still images (pictures) or moving images (videos).
Public domain – Pieces of information that are NO LONGER (or were never) protected by copyright, and can be used by anyone - the creator is no longer being paid for the use of his/her work. It is WRONG to plagiarize information that is in the public domain! The ideas still were created by someone else; you must give that person credit for his/her ideas.
Piracy - copying and sharing copyrighted material, especially with the intent of selling copies of works that were copyrighted by someone else. This is illegal. If you buy a "bootleg" copy of a movie or an album, you are buying pirated material; the seller of the material (the pirate) is doing something illegal, and you are, too - purchasing stolen goods is illegal, especially when you know the material is stolen (which pirated material is). You can see the FBI anti-piracy warning at the beginning of most DVD's, and it's written on the labeling of most CD's.
Bootleg - an illegally-created copy; a copy of material made by someone other than the copyright holder without the permission of the copyright holder.
Public use - the sharing of information or material (video, images, audio recordings) with people other than the original purchaser. Under copyright, public use is not allowed without the express permission of the copyright holder. At the beginning of movies, you see the red FBI warning against public use. At the beginning or end of broadcast sports events, the announcers remind viewers/listeners that recording or redistribution of the event is illegal without express permission of the league - this is the league asserting their copyright and banning public use.
"Fair Use" doctrine - allows for the use of copyrighted materials in limited ways. Some of the basic ideas of this complex doctrine include the allowed use of copyrighted materials for nonprofit educational purposes, and the use of very small segments of copyrighted material, such as properly-cited quotations from written copyrighted material or sampling of copyrighted musical pieces. In other words, it's OK for a teacher to use copyrighted material as long as the teacher is doing so for a sound educational purpose and is not profiting from using that material - that's part of the reason why teachers are not sued for showing movies in school.
Sampling - the use of short clips of copyrighted audio or video as part of the creation of a new work without permission of the copyright holder. Sampling was used widely in the early years of rap and hip-hop, when musical artists would take short clips from copyrighted songs and loop them to create beats and musical tracks over which to rap. Many of these artists were sued, and sampling has fallen out of practice. However, it remains a "gray area" legally, and some are fighting for the legal acceptance of sampling under the fair use doctrine. Currently, those who sample do so at the risk of being sued.