A pupil at the school wishes to go home but isn't allowed. The headmaster, Mr Finch played by Anthony Head on finding out that the girl is an orphan invites her into his room where its then implied he eats her.
The Doctor is disguised as a Physics teacher and tries to take a class. One pupil seems to be brighter and cleverer than all the others put together which The Doctor finds is odd. At lunch, the Doctor finds Rose Tyler who is a dinner lady and she's not happy. The Doctor and Rose are investigating the school after being tipped off by Mickey Smith. Rose witnesses an accident in the kitchen where a chemical is spilt and one of the dinner ladies is in agony.
Also investigating the school is Sarah-Jane Smith, an ex-companion of the Doctor. The Doctor recognises Sarah-Jane instantly but because he has gone through a number of regenerations since, the recognition isn't the other way around.
That night the Doctor, Mickey and Rose break into the school to look around. They discover a cupboard where inside are rats in plastic bags. Further investigation, the Doctor finds giant bats inside the Headmasters room. The Doctor recognises the aliens as being Krillitanes who have changed since he last saw them. The Krillitanes copy features of aliens they see, the wings are something knew. The Doctor bumps into Sarah-Jane and tells her who he is. Sarah-Jane shows the Doctor K9, the robotic Dog of the Doctor.
The Doctor, Mickey and Rose go to a cafe where they have dinner. Up above, Mr Finch watches down on them from the roof of the building across the road. A Krilitanite attacks the heroes then flies off.
The next day, Mr. Finch puts his master plan into operation. The Doctor, Rose and Sarah-Jane visit the school once more where they set about trying to defeat the Kirlitanites. The Doctor discovers why the Kirlitanes want the school. The children are being used to solve a puzzle that will give the Krilitanes unlimited power in the universe. The Doctor smashes the computers and escapes to the sports hall.
Mickey is stuck looking after K9 when he sees a kid banging the windows and decides that he must go in and help. Mickey uses his car to smash the windows in and with K9 join up with the Doctor. The Doctor realises the oil that are in the oil drums in the kitchens are dangerous to the Krilitanes but cause humans to be cleverer than normal. K9 volunteers to blow up the oil drums and kill the Krilitanes which the Doctor accepts. The plan works, the children are safe and the Krilitanes are defeated.
The Doctor says goodbye to Sarah-Jane and as he disappears in the TARDIS, K9 is revealed looking perfect.