Background information- The demon headmaster used to be a series of books created by Gillian cross, but where adapted to a television series aimed at children in 1982.
The title is kind of a giveaway of what its about. The headmaster played by, Terrence Hardiman, is the head master at the school, and uses hypnosis to make the pupils do what he says, and rule over them. All of the students that are hypnotized think that the head is "A marvelous man".
The young boys Lloyd & Harvey are not being hypnotized by the headmaster, they try to question Dinah, and they try to stop the Headmaster hypnotizing the world, and taking over.