A substitute teacher was someone who briefly taught in the event of a teacher's absence.
In 2369, Miles O'Brien substituted for Keiko while she was on Earth. After putting up with the student's mischief, he would later tell Benjamin Sisko that "kids like nothing better than to take advantage of a substitute teacher. I always did". (DS9: "The Nagus")