When you crack a egg, you usually see a bubble like thing at one end. This contains air for the chick inside when it is ready to breath air.
How does the chick get the pocket open when it needs the air? Well GOD gave it a thing called a EGG TOOTH. When the chick is ready to hatch and needs air it will squirms around, and its sharp little tooth pokes the air bag allowing the chick to breathe.
Then it's ready to come out, it just keeps chipping away at the egg until it breaks forth.