The mucus plug is a plug made of mucus that develops during pregnancy and lodges in the cervix to block the cervical canal. Its job is to protect your uterus from unwanted bacteria and pathogens that could enter in, like from sexual activity or vaginal exams.