This is the most common way to ask someone how they are in Spanish. It is a polite and respectful way to address a teacher.
¿Cómo te encuentras, profesor?
This is another way to ask someone how they are in Spanish. It is less common than the first phrase, but it is also polite and respectful.
¿Qué tal, profesor?
This is a more informal way to ask someone how they are in Spanish. It is not as polite as the first two phrases, but it is still acceptable to use with a teacher.
¿Cómo va todo, profesor?
This is a very informal way to ask someone how they are in Spanish. It is not recommended to use this phrase with a teacher, as it is not very respectful.
¿Cómo estás hoy, profesor?
This is a good way to ask a teacher how they are doing on a particular day. It is polite and respectful, and it shows that you are interested in their well-being.