They weren't in a room, as he had supposed. They were in a corridor. The forbidden corridor on the third floor. And now they knew why it was forbidden.
They were looking straight into the eyes of a monstrous dog, a dog that filled the whole space between ceiling and floor. It had three heads.
Harry Potter- PS
The trio plus Neville go to meet Draco for the midnight duel, only to discover that Hermione was in fact correct and it was a trap. The four of them made a run for it, not paying attention to where they were going and ended up on the third floor corridor. Trying the door and discovering it locked, Hermione cast ‘Alohomora.’ and unlocked it, not paying attention, they all ran into the room closed the door behind them. It was only Neville who noticed what was in there, and had to get the attention of the others, without further disturbing what was lurking in there, Fluffy.