Oogenesis
Egg formation takes place in the ovaries.
In contrast to males, the initial steps in egg production occur prior to birth. Diploid stem cells called oogonia divide by mitosis to produce more oogonia and primary oocytes. By the time the fetus is 20 weeks old, the process reaches its peak and all the oocytes that she will ever possess (~4 million of them) have been formed. By the time she is born, 1–2 million of these remain. Each has begun the first steps of the first meiotic division stopping at the diplotene stage of meiosis I.
No further development occurs until years later when the girl becomes sexually mature. Then the primary oocytes recommence their development, usually one at a time and once a month.
The primary oocyte grows much larger and completes meiosis I, forming a large secondary oocyte and a small polar body that receives little more than one set of chromosomes. Which chromosomes end up in the egg and which in the polar body is entirely a matter of chance.
In humans (and most vertebrates), the first polar body does not go on to meiosis II, but the secondary oocyte does proceed as far as metaphase of meiosis II and then stops.
Only if fertilization occurs will meiosis II ever be completed. Entry of the sperm restarts the cell cycle
breaking down MPF (M-phase promoting factor) and
turning on the anaphase-promoting complex (APC).
Completion of meiosis II converts the secondary oocyte into a fertilized egg or zygote (and also a second polar body).