Vertical transmission
During pregnancy, the placenta protects the fetus from its mother's blood.  However, during childbirth, the placenta stays in the womb while the baby travels through the birth canal.  While it is being born, the mother's blood and other body fluids get on the baby, and the baby also touches its mother's genitals.  Because of this, infections that are carried in the blood, in body fluids, or in sores on the mother's genitals can infect the baby.