We bought the rights to a collection for use by our trainers in class. The music works great, and we stay legal. Although I am not a lawyer and this information should not be taken as legal advice, there are certainly copyright restrictions affecting your using music or other media in your class - this is considered a public performance. The first consideration is what kind of class it is. You don't indicate if you are teaching in a regular school or college or if you are teaching in a for-profit training facility or some similar venue.
Most colleges do.
This will allow you to play recorded music in your class. It does not give you permission to record all or part of the song and use in as part of a training or instructional package. If you are teaching in a school or college and your students are registered as members of a regular class or course of instruction, the Fairuse Guidelines for Educational Multimedia will apply. These only apply to non-profit educational institutions. All others including training consultants, etc. are not covered and must get permission for using copyrighted material as part of their training program.