To understand this condition, it is helpful to understand how the urinary tract works. In simple terms, the kidneys filter the blood and remove waste products that are then taken out of the body in the urine. The cortex of the kidneys make the urine. This urine collects in the pelvis, which empties into a tube (the ureter) and then drains into the bladder. From the bladder, urine drains out of the body through the urethra.
During pregnancy, the placenta does most of this work for the baby. The baby's kidneys start to produce urine beginning between the 5th and 9th week. Before birth, the urine made by the kidneys contributes to the amount of amniotic fluid that surrounds the baby. The amniotic fluid is important for lung development and maturing as well as giving the baby a "cushion" and providing him or her space to move.