1) The teacher needs a thorough understanding of the topic being taught. I regularly use the reverse of this as a litmus while mastering a topic: I did not understand it deeply enough if I can't explain it to a complete layman so they can understand it.
2) Having a full duplex interaction. Talking AT people will make them only bored, but not smart. Watch for reactions, ask questions to force the student to explore the topic being discussed. If they can't answer, try to find out where their train of thought stalled, and elaborate. Of course this doesn't work very well in larger groups of students.
Usually, neither circumstances (smart teacher, small group of students) are given in compulsory education.