When you go into labor and the baby is ready to be born the baby will move into the position to be able to rupture or break the amniotic sac.
The baby breaks the amniotic sac by using it's head to put pressure on the amniotic sac which then ruptures or breaks the amniotic sac.
It's a natural process and usually doesn't harm the baby but there have been some cases where the babies head had some injuries as a result of it's head rupturing the amniotic sac although that's rare.
If the baby is ready to be born and you want to speed up the process of labor you can induce labor at the hospital which will stop the baby from having to break the amniotic sac.