Cerberus the three headed dog was the guardian of the underworld in Greek mythology. He was the offspring of the monsters Echidna and Typhon and as such he was the "brother" of the Lernaean Hydra, the Nemean Lion, the Sphinx, the Ladon and the Chimera (some of his brothers were killed by Hercules).
Cerberus is usually represented as having three heads (Only Hesiod, in his Theogony, affirms that the dog has 50 heads). He also has a snake's tail and a mane made of serpents. He was the guardian of the underworld (Hades) and he had the task of preventing the living persons from getting in and preventing the dead souls to leave Hades.
The twelfth labour of Hercules (and the final one) was to capture Cerberus and bring it to king Eurystheus' court. First, the hero went to Eleusis, where he was initiated in the Eleusinian Mysteries so that he could learn how to enter safely the underworld. He was also helped by the gods Zeus, Hermes and Athena.
Hercules met Hades and asked him for permission to take Cerberus with him, to the world of the living. Hades agreed, but on condition that the hero would not use his weapons. Hercules managed to tame the beast by partially strangling it.
The hero took Cerberus the three headed dog to Eurystheus, but the king was very frightened when he saw the beast. That's why he hid away and told Hercules to take the dog back to Hades.
Cerberus also appears in the story of Orpheus, who managed to make him sleep by playing his music. This way, Orpeus was able to get into the underworld, in order to look for Eurydice.