Roles
Note that maestro and profesor both mean teacher, but they are not interchangeable in Latin America. Maestro is the standard term at the primary school level, while profesor is used at secondary schools and universities.
Heads up: compañero does not only mean classmate. It means companion or partner in any context. A compañero de trabajo is a coworker, and a compañero de cuarto is a roommate. The word you are studying is just one of its many uses.