Of course, babies require a little help with this at the start, and the mother does so by giving her child some of her own immune defence, also known as passive immunity.
This begins while the baby is still in the mother’s womb, where she passes antibodies on to her unborn child via the placenta. Then, during vaginal birth, the newborn receives a dose of bacteria from the mother’s birth canal. Breast milk also provides an initial supply of antibodies present in the mother's environment. This passive immunity offers a foundation for the child’s own highly effective defence network, which will accompany them for a lifetime.