The root meaning of limbo is "boundary". While "limbo" is often popularly understood to be a "place where souls go", the term also describes and reflects theological uncertainty. As such, limbo is not part of the Church's official doctrine (compare purgatory, which is). Official Church teaching remains that the status of these souls (who don't seem to deserve hell, yet cannot follow the divinely-revealed path to heaven) is in limbo -- in other words, their fate cannot be determined.
The Limbo of the Fathers (limbus patrum)
Several Biblical passages support the belief that people who lived good lives but died before the Resurrection did not go to heaven, but rather had to wait for Christ to open the gates of heaven. Jesus told the "good thief" that the two of them would be together "this day" in "paradise," (Luke 23:43) but between the Resurrection and the Ascension, Jesus told his followers that he has "not yet ascended to the Father" (John 20:17). He is also described as preaching to "the spirits in prison" (1 Pet 3:19). Medieval drama sometimes portrayed Christ leading a dramatic assault -- The Harrowing of Hell -- during the three days between the Crucifixion and the Resurrection; this assault was presented as freeing the souls of the just, and escorting them triumphantly into heaven. This imagery is still used in the Eastern Orthodox Church's Holy Saturday liturgy (between Good Friday and Pascha).
The Limbo of Children (limbus infantium)
The foundational importance of the sacrament of baptism (either the ritual baptism by water or the personal baptism by desire) in Catholic theology gives rise to the argument that the unbaptised are not eligible for entry into heaven, because the original sin of human nature precludes the unbaptized from the pure beatific vision enjoyed by the souls in paradise.
Since infants are incapable of either professing their faith or performing acts of Christian charity, babies rely upon their parents (or other caregivers) to bring them up in the faith. If, for whatever reason, an infant dies unbaptized (see infant baptism,) many eminent theologians have argued that a merciful and just God would not condemn infants to the torments of hell.
Limbo as a State of Eternal, Natural Joy
If heaven is a state of happiness and a union with God, and hell is a state of torture and a separation from God, then (many eminent Catholic theologians have speculated) limbo is a neutral state, in which souls are denied the beatific vision, but saved from the torment of hell. Saint Thomas Aquinas described the limbo of children as an eternal state of natural joy, untempered by any sense of loss at how much greater their joy might have been -- a supernatural joy -- had they been baptized.
These same speculations often extend to encompass God's salvific plans for the mentally handicapped, children younger than the age of reason, and the unborn. Catholic theologians have speculated that a just and merciful god may, in some mysterious way incomprehensible to human minds, give these souls the chance to accept or reject's God's grace, and thereby earn themselves a place in heaven or hell.