The expression a "cuckoo in the nest" has a range of meanings. It can mean any person or thing found where it doesn't belong and is also used to mean any problem that grows quickly, consuming resources needed for other purposes. In addition, the term is sometimes used to refer to an illegitimate child. The expression has been used as the title of movies, TV shows, and novels.
This phrase derives from the nesting habits of some species of cuckoo, a type of bird. Over 50 species of European cuckoo and three from the New World engage in a nesting behavior called brood parasitism. Instead of raising their own young, brood parasites lay their eggs in the nests of other species of bird.
Parasitic cuckoos are host-specific, meaning that each species of cuckoo lays its eggs in the nest of only one other species of bird. Cuckoo eggs have evolved to resemble the eggs of these birds, making them difficult to tell apart. When a cuckoo egg hatches, the host bird raises the chick as one of its own. Cuckoo eggs have a short incubation period and young mature quickly, so the bird has an advantage over the host species young. It usually destroys their eggs or evicts them from the nest, then imitates their cries to get the host parent to feed it, allowing the adult cuckoo to conserve its resources while its young consumes resources meant for others.
The cuckoo's nesting behavior has been known to humans since antiquity. Aristotle and Pliny both described the parasitic behavior of the cuckoo. The idea of the "cuckoo in the nest" was used as an analogy for human behavior at least by the Middle Ages. The Old French term cucuault refers to a husband whose wife has been having an affair and who, by implication, is raising children who may not be his. The name derives from the Old French cucu or cuckoo, and is the root of the English world "cuckold."
Contemporary uses of the phrase vary widely. For instance, one might say, "We were surprised when the family dog adopted a kitten and raised it as her own, like a cuckoo in the nest." Other uses for the phrase might highlight its implications of sexual impropriety or theft of resources.