The professor is teaching to their students.
A professor is teaching a class
A professor is someone who teaches a class, and classes are made up of students.  So if the professor is teaching to their students it means he or she is teaching a class.
(-x)
(-x)