Argus Filch is the caretaker for Hogwarts. He absolutely hates the students (not sure why he's working in a school…), and he likes to patrol the castle at night to catch them up to something. But even more than the students, Filch loathes Peeves, the Poltergeist, who's constantly making a ruckus. One night, when Harry sneaks out to the prefects' bathroom in his Invisibility Cloak to work on the second clue, he gets caught in a trick stair and drops his golden egg. Unluckily, Filch finds it. Filch thinks that Peeves threw it, and that Peeves has been stealing from students. Filch wants to keep it as proof so that Professor Dumbledore will throw Peeves out the castle for good.
Professor Snape comes along to investigate a totally different disturbance: someone has broken into his office. He can't understand why Filch cares about Peeves when people have been stealing Snape's stuff (gillyweed! Dobby has been there! Gosh, everyone is up and out of bed tonight).
Because this is the night that doesn't end, Mad-Eye Moody comes along then too. His special eye can see right through Harry's Invisibility Cloak, and he realizes that the egg belongs to Harry, but that Harry doesn't want to be caught out of bed after hours by Filch or Professor Snape. So Moody manages to get the golden egg back, and he intimidates Professor Snape into leaving before he can find Harry out of bed. In exchange for Moody's help with Filch and Professor Snape, Harry agrees to loan Moody the Marauder's Map, a magical map that shows all the different passages and people currently in the castle. Little does Harry know that Moody is going to use that map to help him murder Barty Crouch, Sr. later...