Kerberos (Latin: Cerberus) is the three headed dog that guards the entrance of the Underworld. He is most known for being captured by Heracles for his 12th labor. But it is never mentioned how Kerberos ended up guarding the Underworld.
In 1828 the Danish sculptor Albert Bertel Thorvaldsen made this piece (above), entitled Cupid Leading Cerberus. On his website the Greek Mythology Link, Carlos Parada has labelled this picture: "Cupid in the Underworld, as the Tamer of Cerberus, with Pluto’s Pitchfork".
This artwork of Thorvaldsen does not seem to be based on any ancient myth but it does present what might be the oldest artistic impression of the monster's origin as a watchdog beyond the plain mention of Cerberus' parents. (I had never thought about the hound as a puppy before I saw this image. Cute as the little monster might be, notice that the puppy's tail is actually a furry snake!)
There are numerous ways in which one could interpret the piece, but an especially literal one would be to appeal to the saying "Love conquers all" (a love story being yet another thing with which I would not have thought to associate the monster dog). On the other hand there's potential here for a story about how the monster used to be Cupid's dog when they were both little. That of course is all otherwise modern fan-fiction.
In his Fall of Troy, Quintus Smyrnaeus mentions Cerberus' birthplace as a dark, rocky cavern "close to the border of eternal Night". In Hesiod's Theogony, Night lives close to the pit of Tartarus, which is in the Underworld. Quintus' description of Night is itself an allusion to the Theogony, wherein Hesiod has the three Gorgons living someplace on the border of the earth-encircling river Oceanus "in the frontier land towards Night" near where the Hesperides are located.
Cerberus has no other role in the mythology whatsoever. He is always mentioned in connection with his guard-dog duty and either with his master Hades/Pluto or with the realm of the dead. He has a number of monstrous siblings (some of whom occur in different authors as his uncles/aunts or nephews/nieces) occupying similar positions as guardians posted by—or as weapons used by—the gods. Presumably because of close family ties shared by the deities with the creatures, the gods simply have ease of access to these beasts, whom they use as mere pets, but seldom is any explanation given of the source of these pets aside from their pedigrees.
Notice, for example, how the war-god Ares sends a sleepless dragon to his devotee King Aeetes of Colchis so that it can guard the Golden Fleece for him in Ares' sacred grove. According to Hyginus this dragon is Cerberus' brother; we are not told how Ares came into the possession of this creature. Same with the Sphinx (sister or niece [or both] of Cerberus), sent by Ares, Hera, Dionysus, Hades or Themis to terrorise the city of Thebes.
Cerberus' uncle or brother Ladon, another sleepless dragon, was posted by Hera to watch over her gardens in Africa. The Hydra, yet another dragon relative of Cerberus, was reared by Hera in the hope that it would grow up to one day kill Heracles [Hercules]. Hera reared the Nemean Lion (also a relative) with the same agenda. The giant eagle (or hawk or vulture) which regularly fed on the liver of the Titan Prometheus was sent by Zeus to do this and was a brother of the hound of Hades as well. Like Ladon and the Hydra, it too was slain by Heracles.
A family member that Cerberus is especially well-known for having is his brother Orthrus (or Orthus), the two-headed sheepdog of the triple-bodied giant warrior Geryones. Apart from a myth-rationalisation by Palaephatus, there is no story which places these two dogs together. There is, however, one character who loosely connects the two, and who perhaps interacted with both guard-dogs on a regular basis, and that is Menoetes, the herdsman of Hades.
Menoetes was friends with Geryones, whose pasture was adjacent to his. Geryones, a red ogre with a herd of red cattle, living on the island of Erytheia, "Red," represented dusk and lived on the edge of Evening, near Sunset, like the Gorgons (one of whom, Medusa, was Geryones' grandmother) and the Hesperides (Evening's Daughters), by the place where Cerberus was born (or hatched?) on the boundary of the Underworld (a threshold which he later blockades). Menoetes lived beyond this borderland, in the nocturnal darkness of the deadlands, with his herds of sable-black cattle.
It was Menoetes who reported to Geryones that Heracles was stealing his cattle, whereupon Geryones rushed to protect his property and ended up getting killed by the thief, together with his dog Orthrus and his own herdsman the giant Eurytion.
Later on, when Heracles visited the Underworld to fetch Cerberus, and, unprovoked, he slaughtered one of Hades' cattle, Menoetes got into a fight with him and almost died after Heracles broke his ribs.
This borderland herdsman Menoetes, who seems to straddle both worlds, that of the living and that of the dead, between Evening and "eternal" Night, might have had something to do with the dogs getting to their respective owners in the first place. That is purely conjectural, though, since, as you say, it simply is not mentioned how the Underworld hound first acquired his post.
In Hesiod's Theogony Cerberus was the offspring of Echidna and Typhon (on the other hand, Hesiod did call him fifty-headed, so). To back this story up, note that Euphorion of Chalcis described him as having eyes that flashed like the volcanic Mount Etna. Why would this back anything up? Because traditionally, Typhon either resided in Tartarus or was buried under Mt. Etna, and his occasional struggles to get free of his prison were volcanic eruptions.
So we therefore have that Cerberus was the offspring of Echidna and Typhon. From here there are really no clues that indicate how it got to Hades, but I have an educated guess or two. If Typhon was stuck in Tartarus, then Hades probably saw Cerberus and fetched him for his own use. Another possibility: Cerberus wasn't the only multi-headed guard dog born of Echidna; the other, Orthrus, guarded the cattle of Geryon, so perhaps Hades was tipped off to the existence of multiheaded guard dogs by Orthrus.