found this on wikipedia:
Cervical mucus
After a menstrual period ends, the external os is blocked by mucus that is thick and acidic. This "infertile" mucus blocks spermatozoa from entering the uterus. For several days around the time of ovulation, "fertile" types of mucus are produced: they have a higher water content, are less acidic, and have a ferning pattern that helps guide spermatozoa through the cervix. This ferning is a branching pattern seen in the mucus when observed with low magnification.
Some methods of fertility awareness involve estimating a woman's periods of fertility and infertility by observing changes in her body. Among these changes are several involving the quality of her cervical mucus: the sensation it causes at the vulva, its elasticity (spinnbarkeit), its transparency, and the presence of ferning.
Cervical mucus Most methods of hormonal contraception work primarily by preventing ovulation, but their effectiveness is increased because they prevent the fertile types of cervical mucus from being produced. Conversely, methods of thinning the mucus may help to achieve pregnancy. One suggested method is to take guaifenesin in the few days before ovulation.[6]
During pregnancy the cervix is blocked by a special antibacterial mucosal plug which prevents infection, somewhat similar to its state during the infertile portion of the menstrual cycle. The mucus plug comes out as the cervix dilates in labor or shortly before.