Maestro literally means teacher. However, in Mexico City maestro or maestra is often used to refer to any random person, regardless of her occupation or educational background. Some dervatives of the word maestro are: maestrín (something like "little teacher"), maese, and master (from English language).
Maestro and maestrín are not insulting but are impersonal. Do not call your friends maestro or maestrín. Use it to refer to people you do not know. However, calling your friends maese or master is perfectly fine.
Lalo: ¡Master! ¿Cómo va la venta de buñuelos?
Pepe: Bien, excepto por un maestrín que vino a quejarse, que'sque se empachó.
Lalo: Dude! How's the sales of fritters going?
Pepe: It's going well, except for a dude that came back to complain, allegedly he got tummy ache.