It has no meaning. It mainly means that an impossible situation happened because of the teacher, so as to make fun of the teacher.
Example:
When the physical education teacher turned around, Jordan switched to table tennis.
When the chemistry teacher turns around, the carbon dioxide turns into gasoline.
The physics teacher turned around and used a lever to pry the earth.
Wait