In Neil Gaiman's Sandman, the Cuckoo is a villain that appears in the A Game of You story arc. The exact nature of the Cuckoo is not explained, but it seems to be a psychic entity that feeds on other's mental energy. It takes the name of Cuckoo because, much like a Cuckoo bird, it can make other people want to care for it and do what it says.
The genesis of the Cuckoo is not explained directly, either.
In the story, Barbie, a once normal yuppie woman who has moved to New York City. She has fallen out of touch with a rich dream life she had as a younger woman, a falling out that is revealed to be caused by the Cuckoo hijacking her dream realm. The characters in the dream realm who are still loyal to her (calling her "Princess Barbie") summon her back so she can resist the Cuckoo. She does so for a long time, but in the end is tricked by the Cuckoo's powers. The Cuckoo appears to her as a younger version of herself, and tells her that she (The Cuckoo) was born out of Barbie's young, bored dreams of having a more interesting life. The Cuckoo uses her powers to make Barbie sacrifice her life so that the Cuckoo can escape the small dream dimension. The Cuckoo even manages to enchant the Witch Thessaly, who was pursuing her with a vengeance. In the end, however, she can not trick Morpheus, the King of Dreams. Morpheus does allow the Cuckoo to go free when Barbie chooses to be returned home safely, rather then to get revenge on the Cuckoo. The last scene of the story arc has the little girl turning into a bird and then flying off, apparently to infect other realms with her psychic vampirism.
The storyline of A Game of You is complex and involuted, and not tightly connected to the overall arc of the Sandman. The Cuckoo is not even, in some ways a traditional villain, being portrayed as an entity that exists by animal instinct, even if it has human intelligence. Although the Cuckoo's machinations put the story into motion, they are not actually the focus of the story, with the story instead being on more subtle ideas of identity and relationship. As Neil Gaiman himself has said, the story is meant to be a "female" story, and the conclusion of the story is in self-discovery, rather than in cataclasmatic battle with a villian. It could be stated that as the characters in the story discover their identities, they are in fact, defeating the Cuckoo, who seems to be a symbol of lost identity. Be that as it may, I would still like to know where the Cuckoo came from, and what happened to it after it flies away to other realms.