The cervix serves several purposes in the female reproductive system, including dilation during menstruation and childbirth and constricting during pregnancy, according to Women's Health. The cervix is a sphincter located between the vagina and uterus with an opening called the cervical os.
During menstruation, the cervical os opens to let menstrual fluid out of the uterus and into the vagina. When a woman is pregnant, the cervical os constricts to keep the fetus inside the uterus, preventing miscarriage in most cases, explains Women's Health. During childbirth, the cervix significantly stretches and opens, allowing the baby to pass through the birth canal and out of the vagina.