Notices go up overnight announcing that Umbridge is now the Headmistress. The students all seem to know that Dumbledore evaded Fudge, two Aurors, and Umbridge. Harry learns from Ernie that Dumbledore's office sealed itself against Umbridge. Malfoy interrupts and says that since he's part of the Inquisitorial Squad—a group of students who support the Ministry—he can take points from Harry and his friends for no reason. Harry watches rubies fly out of the Gryffindor hourglass in the entrance hall as Fred and George join them. They say that Montague tried to take points from them, but they forced him into a Vanishing Cabinet. The twins announce that they no longer care about getting into trouble and want to make Dumbledore proud.
Remember that Fred and George aren't at school to get good grades in class, necessarily; they're at school to fine-tune things for their joke shop. This means that they have little incentive to work hard to stay in school, which gives them immense freedom to do whatever they please to torment Umbridge. The fact that Dumbledore's office won't allow Umbridge in shows that Hogwarts is able to protect itself against infiltration to a degree—as far as it's concerned, Dumbledore is still the rightful headmaster of the school. At the same time, things are going even more horribly at Hogwarts now, as the school has basically become a dictatorship under Umbridge’s total control.
As Ron, Harry, and Hermione enter the Great Hall, Filch grabs Harry to see Umbridge. Filch mutters about how excited he is to be able to punish students now and shoves Harry into Umbridge's office. Harry sits and tries to refuse her offer of a drink, but finally accepts tea. Umbridge makes a show of putting milk in it with her back to him. As Harry lifts the cup, he thinks of Moody and only pretends to drink. Umbridge starts asking Harry about where Dumbledore and Sirius are. He insists he doesn't know. She dismisses him with a warning that all communication is being monitored.
Moody has a habit of only drinking from a hip flask, which means he's less likely to be poisoned by an enemy. Harry's ability to think of this and take measures to protect himself shows that in times like this, he's able to draw on knowledge and examples from many people to come up with a plan. This is one of the things that, ideally, Harry would teach the D.A., as it's one of the less measureable things that make him successful.
Harry and Umbridge then hear a loud noise and screams from downstairs. In the entrance hall, they find huge fireworks flying around—but they don’t burn out, and seem to get bigger and multiply by the minute. Laughing, Harry ducks behind a tapestry and finds Fred and George hiding there. George laughs that he hopes Umbridge tries to Vanish them, as doing so makes them multiply. The teachers don't seem bothered and McGonagall and Flitwick refuse to attend to the rampant fireworks, so Umbridge spends her first day as headmistress putting them out. That evening, Hermione compliments the twins.
By not putting out the fireworks, McGonagall and Flitwick quietly support Fred and George in their crusade and show again that resistance and supporting a rebellion doesn't need to happen in an especially obvious way. When Hermione compliments the twins, it shows that she's also coming to terms with the evidence showing that they don't need high test scores in order to be successful—the fireworks are proof of that.
Harry crawls into bed later and immediately begins dreaming about the Department of Mysteries. The door opens, letting him into a circular room, and the door directly across from him opens too. Harry goes through another door until he's in a dark room with shelves of dusty glass orbs. Just as he reaches something he knows he wants, he wakes up angry, his scar hurting. Harry spends the next day feeling guilty, as he knows Snape will be angry. On his way to Snape's office, Cho stops Harry to try to defend Marietta. Harry is incredulous. They yell at each other and part ways.
Harry's choice to not forgive Cho and instead, to affirm his loyalty to his friends, Dumbledore, and the D.A. shows that at this point, Harry is too invested in his friendships and caring for those people than he is in trying to make a relationship with Cho work. Harry slowly gains more information through his dreams, but at this point it’s likely that Voldemort is actively influencing him, rather than simply sharing an accidental connection.
Harry lies to Snape that he's been practicing, but before Snape can break into Harry's mind, Malfoy knocks and tells Snape that they found Montague and need help. As Harry prepares to follow Snape out of the office, he catches sight of the Pensieve and wonders what Snape has in there. Harry puts his head into the Pensieve and falls into the middle of the Great Hall. Students seem to be taking a test; they're writing furiously at individual desks. Harry locates teenage Snape and sees that he's taking his Defense Against the Dark Arts O.W.L. Harry also finds James, Sirius, Lupin, and Wormtail. James and Sirius are extremely handsome.
Harry seems surprised to encounter his father in Snape's memory. This really shouldn't be a surprise for him, given that Snape is trying to keep thoughts from Harry he doesn't want him to see, and Harry knows that Snape loathes James and has since school. This shows how Harry's love of his father and his excitement at getting to see him in the flesh renders him unable to think critically about what he's seeing and why Snape didn't want him to see it.
A young Flitwick announces the end of the exam and releases the students. Harry tries to keep himself between Snape and James's friends as they all walk onto the grounds. Snape remains engrossed in the sheet of questions and sits on the grass. James and his friends sit under a beech tree, and James pulls out a Snitch he stole and starts playing with it. Wormtail watches openmouthed, but James seems more interested in impressing girls sitting by the lake. Sirius announces that he's bored, and James points out Snape. Sirius says, "Snivellus." Lupin keeps his eyes on his book as Snape and James draw their wands. James Disarms Snape, teases him about his greasy skin, and then conjures soap bubbles in Snape's mouth.
James's behavior toward Snape is objectively cruel, awful, and unwarranted. This suggests that at least as a young man, James wasn't an especially kindhearted person, something that goes against everything that Harry has ever heard about his father. It's also worth noting that Lupin doesn't do anything to stop James and Sirius from bullying Snape, which makes him complicit as well. This also shows that the school’s inter-House hatred isn't something new by any means.
Lily appears and shouts at Sirius and James to leave Snape alone. James begins messing up his hair to impress her. She calls James a bully and James agrees to leave Snape alone if Lily goes out with him. Snape and James shoot curses at each other again, but James comes out on top: he turns Snape upside down to reveal his dirty underwear. Lily and James argue, and finally James lets Snape go. Snape calls Lily a Mudblood, saying he doesn’t need her help. Lily insults James and walks off, and James turns Snape upside down again. Harry feels a hand on his arm and sees a furious adult Snape next to him. Snape yanks Harry out of the Pensieve, swears him to silence, and throws Harry out of his office. Harry is horrified by what he saw: his father was as arrogant and mean as Snape has always said he was.
Though Snape is a victim here, he's not entirely innocent—remember that "Mudblood" is an extremely offensive slur in the Wizarding world. This again shows Harry that not everyone is entirely good or entirely bad; one can be a victim who uses hateful language, and someone can also, like James, be a good person according to some people, but still have a questionable history as a bully. This experience in Snape’s memory shakes up a huge part of what Harry previously took for granted—that his father was a hero, and Harry should be proud to be like him.