Hermione Granger intercepts Ron and Harry, yelling at them for walking out to [duel] with Malfoy. When they get outside the portrait hole, however, they discover Neville - and realize that with the Fat Lady gone, neither Neville nor Hermione can get back in. So, all four head off for the trophy room.
In the trophy room, Harry discovers that Malfoy is nowhere to be found, but Filch is. The group flees the scene and hides behind a locked door, where Filch doesn't find them thanks to some timely help from Peeves.
Harry, Ron, Hermione, and Neville realize they've accidentally locked themselves into the [third-floor corridor] with a three-headed dog, and quickly run back to Gryffindor Tower, where Hermione chews out Ron and Harry and they all head up to bed - though not before realizing that the dog is guarding something.
Chapter 10 - "Halloween" - In which Harry receives a Nimbus 2000 broom, learns the rules of Quidditch and begins to practice. On Hallowe'en Hermione masters levitation in Charms but the remarks of a jealous Ron send her in tears to the girls' bathroom, where she is trapped with a troll. Harry and Ron run to her rescue and defeat the troll. Hermione tells a lie to keep them out of trouble, and the three become friends.