First, determine if you are dealing with a copyrighted work.
Copyright covers "original works of authorship fixed in any tangible medium of expression."
Copyright protection is automatic from the moment of creation. Student work, class notes, YouTube videos, websites, personal letters, email, diagrams, and many other things are all covered by copyright.
Second, if the work is not in the public domain or licensed for use, is there a legal exemption to copyright law that would allow you to use the work?
Third, if the work you wish to use is not licensed or covered by an exemption, you may run a Fair Use analysis.
If none of the above allows you to use a copyrighted work, then you can seek permission, which may involve paying royalties.
Nothing on this guide is to be construed as legal advice. These pages are intended to provide information and guidance in the application of copyright law and to expand on the University of Missouri System Collected Rules and Regulations.
Thanks to Miller Nichols Library of UMKC for permission to reuse material from their Copyright guide.