Buenas tardes, profesora/profesor.
* Buenas tardes: Good afternoon
* profesora: teacher (feminine) Use this if your teacher is a woman.
* profesor: teacher (masculine) Use this if your teacher is a man.
You could also use a more informal option, depending on your relationship with your teacher:
Buenas tardes, profe. (This uses a shortened, informal version of "profesor/profesora") Only use this if appropriate for your relationship with the teacher.