The cervical mucus is influenced by the hormones in your body and changes its consistency. Essentially, there are the following distinctions:
no cervical mucus
creamy cervical mucus
glassy / egg-white-like / stretchy cervical mucus
The closer you get to ovulation, the more oestrogen is produced by the maturing egg and the more glassy, spinnable and egg-white-like your cervical mucus becomes.
It has various functions: It protects against infections and provides a suitable environment to support sperm on their way to the egg.