The mucus plug is just what it sounds like — a thick plug of mucus that builds up at your cervix over the course of pregnancy and covers the opening of your uterus. It's there to prevent bacteria from entering your uterus. When your cervix starts to efface or dilate in preparation for labor, the "plug" is pushed out into your vagina, meaning you may see it plop on out into the toilet. Heard of the "show" or "bloody show" that comes as you move towards labor? This is part of it, along with some lovely mucusy discharge and maybe a little blood. Don't worry if you don't see your mucus plug, though — not everyone notices it.
American College of Obstetrics and Gynecologists. Your pregnancy and birth. 4th ed. Washington, DC: ACOG; 2005.