When your mucus plug comes out it can be weeks later or even soon after when you go into labor and give birth to the baby.
You can also lose your mucus plug and still not go into labor. It has happened to some pregnant women before.
But if your mucus plug does come out you should go see a doctor because labor might start soon after, you just never actually know.