Mucus plug

What does loosing your mucus plug mean ??  How long do you think until labor ?