maestra e maestro are used for teacher for children in the first five years of school. After that, we use professore or professoressa.

Maestro in the meaning of master still survives in some old expressions.

Dottore is everyone is graduate with a laurea in every subject, but in practice it is used just for doctors in medicine