X-Men #17 picks up immediately from the fight with the Sentinels in #16, with the Beast and Jean injured and Iceman in a coma. The first order of business is keeping Xavier's secret identity while he visits the X-Men in hospital. We see now why he has previously been so anxious about not being seen with the X-Men in public - he is a recognised media pundit. Xavier stresses the importance of keeping the X-Men's parents safe. He really shouldn't think things like this, as the situation degenerates and by the middle of issue #18, Magneto (for he has returned!) has all the X-Men bar Iceman in a gondola, control of the school, and a plan to use the body cells of Angel's parents (who are captive in a room upstairs) to create an army of mutants, with which he will take over the world. It's not immediately clear how Magneto knew the X-Men were based at the school. Certainly in issue #5 he had minions snooping around there, and this foreshadows the later information that he had a pre-existing relationship with Xavier.
After several pages, we are told story of how Magneto escaped from the Stranger, by Xavier mindreading him for our benefit. (The Stranger had made the schoolboy error of leaving him unsupervised on a planet with lots of metal spaceships). Rather capriciously, he'd left Toad behind. Back at the action, Magneto starts his machine, which turns out to actually create mutants from whole cloth, rather than mutate existing humans. Iceman arrives on the scene to distract him, and then the X-Men break free and join in the fight.
This story, along with the preceding Sentinel three-parter start to consider what the X-Men's secret identies actually mean, and how they keep their cover story of school going. Turns out a telepath with an ethics problem can keep a pretty good cover.