Fair use is a provision of US copyright law that allows exceptions to an author's exclusive rights to their creative work. The Provision, Section 107 of the US Copyright Act, allows for the use of copyrighted material "for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship and research." Other countries have their own version of copyright law, which is important to keep in mind when the copyright holder is outside the United States.
In the United States, using copyrighted material for educational purposes does not automatically mean the use is fair. The fairness of use is determined by weighing four factors. They are:
To determine fair use you need to weigh all of the four factors, and not all factors are weighted in the same way for each use. Generally speaking, the use of copyrighted material can be considered fair when a majority of the factors meet the threshold of fair use.