The fetus does not actually breathe in the womb. The mother breathes for the fetus, and essential oxygen is passed to the fetus through the umbilical cord. The fetus does make breathing-like movements though. These begin at 9 weeks of pregnancy and allow the fetus to practice this breathing movement.
btw the fetus is the baby