Menstruation occurs as the woman's reproductive system prepares her body for pregnancy. A woman produces a hormone called estrogen that makes the walls of the uterus thicken to provide nourishment and safety for the embryo if a pregnancy occurs. When the ovaries release an egg, it travels through the fallopian tubes to the uterus. If no sperm fertilizes the egg, it detaches from the uterine wall and the thick lining is shed. The shedding of the uterine wall is the beginning of the menstrual cycle.