Blood flow through the heart in a fetus differs from that in children and adults. In children and adults, blood picks up oxygen in the lungs. But in a fetus, the blood that enters the heart already contains oxygen, supplied from the mother by the placenta. Only a small amount of blood goes through the lungs (which do not contain air). The rest of the blood bypasses the lungs through two structures:
The foramen ovale, a hole between the right and left atria
The ductus arteriosus, a blood vessel that connects the pulmonary artery and the aorta
Normally, these two structures close soon after birth.