Fluffy is a giant three-headed dog provided by Hagrid to guard the trapdoor leading to the underground chamber where the Philosopher's Stone was hidden until the end of Philosopher's Stone. The only known way to get past Fluffy is to lull him to sleep by playing music. Fluffy is based on Cerberus, the three-headed dog from Greek mythology that guards the gates to the underworld. As with Fluffy, Cerberus was lulled to sleep with music by Orpheus.
In Philosopher’s Stone, Harry, Ron, Hermione and Neville accidentally run into Fluffy whilst hiding from Peeves, who was attempting to give them away to caretaker Argus Filch, who was searching for them. On Halloween, Harry and Ron witness Snape entering the door to Fluffy’s chamber, and for the next few days having a pronounced limp. Harry also overhears him saying "How are you meant to keep your eyes on all three heads at once?" to Filch. However, it is later revealed that he followed then Hogwarts Defence Against the Dark Artsprofessor Quirinus Quirrell into the chamber. While Fluffy is guarding the Philosopher’s Stone, Professor Quirrell penetrates Fluffy’s defences by playing a harp, in order to access the trapdoor, while Harry uses a flute that had been given to him by Hagrid.
J. K. Rowling later revealed that Fluffy was repatriated to Greece by Dumbledore