During pregnancy the fetus depends on its mother for nourishment and oxygen since it cannot breathe air it's blood circulates differently than it does after birth.
Due to the circumstances stated above the mothers womb develops an organ known as the placenta that develops and implants in the mother's womb during pregnancy to provide oxygen and nutrients to the growing baby and remove waste products from the baby's blood
The fetus is connected to the placenta by the umbilical cord which contains blood vessels that transport nutrients and oxygen from the mothers blood to the baby and also transports waste products and carbon dioxide from the baby to the placenta and then to the mothers circulatory system to be eliminated.