The uterine wall consists of three layers: the endometrium, myometrium, and perimetrium. The endometrium undergoes cyclic changes during the menstrual cycle in response to hormones from the ovaries. It has two layers - a functional layer that is shed during menstruation and a basal layer that remains. The menstrual cycle involves the maturation and release of an egg, and hormonal changes produced by the ovaries cause the endometrium to cycle between phases of proliferation and secretion. If fertilization does not occur, the corpus luteum degenerates and menstruation begins as the endometrium enters an ischemic phase and is shed.