Fair use is defined in Section 107 of the Copyright Act, but I use “defined” very loosely because it is completely up to interpretation. Basically, under certain circumstances, it is ok to use a work that is still under copyright, if it can be argued adequately in court as fair use. Below are four factors that courts use to determine whether something is fair use, but even these are up for interpretation. Don’t take these things as rules, but rather as guidelines. In different circumstances, some of these factors will be weighed more heavily than others!
A use of copyrighted material can be considered a fair use if:
“(1) the purpose and character of the use, including whether such use is of a commercial nature or is for nonprofit educational purposes”
“(2) the nature of the copyrighted work”
“(3) the amount and substantiality of the portion used in relation to the copyrighted work as a whole”
“(4) the effect of the use upon the potential market for or value of the copyrighted work”
These are quite complicated and if you're concerned about whether or not your use of a copyrighted work is considered fair use or not, it's always a good idea to contact a lawyer. This guide is not legal advice, so please contact a lawyer for more specific questions.
You can also test your understanding of fair use by taking the two quizzes at the end of this guide under the "Test Your Knowledge" tab on the left.