Harry's scar sears and he sees that Voldemort knows he's captured at Hogwarts. He returns to his reality when he hears a bang; Luna Stunned Alecto. Harry and Luna hide under the Cloak as Ravenclaws come down to see what the noise was. Harry checks in with Voldemort and sees he's checking on the locket. Amycus knocks on the door but refuses to answer the riddle posed by the knocker. Professor McGonagall interrupts his shouting, answers the riddle, and lets him in. He shrieks that they're doomed when he sees Alecto and explains that she told Voldemort that they have Harry. Alecto has been keeping watch, as they suspected he'd try to get into Ravenclaw Tower.
McGonagall's ability to answer the knocker's riddle shows that, while she may be the head of Gryffindor House, she still has qualities that would make her a good Ravenclaw—which adds nuance to the idea that people in general are multifaceted and the Sorting doesn't accurately get at all the qualities and character traits of a person.
Amycus suggests that they can blame it on the kids and let Voldemort deal with them. McGonagall refuses to allow this and Amycus spits in her face. Harry reveals himself, performs the Cruciatus Curse on Amycus, and tells McGonagall that Voldemort is coming. Luna reveals herself, and Harry asks McGonagall if she knows where the lost diadem is. She tries to get Harry to leave, but puts Amycus under the Imperius Curse and ties up both Carrows. Harry flits between his mind and Voldemort realizing that the locket is gone. He tells McGonagall that he has to finish Dumbledore's mission and she needs to get the students out of Hogwarts. She promises to secure the school and take students out through the Hog's Head while Harry searches.
That McGonagall so readily accepts Harry, his explanation, and that she needs to protect students shows that she's also been a waiting member of Harry's resistance movement—and that her first loyalty is to the children she's charged with protecting. By agreeing to make sure the school is safe for them, McGonagall shows that she understands that the battle with Voldemort is really about who will control the school, and who will have control over the lives of these students and what they believe.
McGonagall sends Patronuses and leads Harry and Luna under the Cloak through the school. They run into Snape, who asks where the Carrows are and if they caught an intruder. He wants to know why she's awake and if she's seen Harry. The professors begin to duel and Professors Sprout, Flitwick, and Slughorn join McGonagall. They chase Snape until he jumps out of a window. Harry sees a winged shape flying away. He sees Voldemort heading for the school and shouts that they need to barricade Hogwarts. Sprout runs to fetch her students while Flitwick begins casting spells. Harry asks him if he knows where Ravenclaw's diadem is, but he doesn't know. Slughorn nervously suggests that trying to fight Voldemort is foolish, but McGonagall tells him that if he tries to undermine their efforts, they'll fight to the death.
Remember that Slughorn was a Slytherin; with Snape now acting as headmaster, Slughorn has now likely become the head of Slytherin House. His nervousness suggests that what motivates Slytherins more than anything else is fear, not necessarily greed or a love of power. This is an important idea for Harry to grapple with going forward, as he does know that Voldemort fears death more than almost anyone else—and possibly, fears death more than he wants to be in control of everything.
Harry and Luna follow McGonagall, watch her bring the suits of armor to life, and then run back to the Room of Requirement. There, they find Kingsley, Lupin, Mr. Weasley, Mrs. Weasley, and the Gryffindor Quidditch team. Harry explains that they're going to fight. Most of the room races for the Great Hall, but Harry joins the Weasleys in the middle of the room. Mrs. Weasley forbids Ginny from fighting as Percy tumbles through the tunnel. Fleur and Lupin start to loudly talk about Teddy as Percy apologizes and explains that he's been trying to get out of the Ministry safely for a while. They all decide that Ginny will stay in the Room of Requirement and Harry is puzzled to learn that Ron and Hermione went to the bathroom. He flits to Voldemort's mind and sees that Voldemort is ready to kill.
Percy's choice to rejoin his family and fight for the side of good—and the Weasley family's willingness to forgive him—shows Harry yet again that choices define a person. Percy can now go down in history as someone who made the choice to fight on the right side and for the right reasons. Like Dumbledore, he can go on to be a person who made a grave mistake in his youth, but he can also move forward and be a person who ultimately chose to dedicate himself and possibly die fighting for good.