If I remember rightly it sort of bursts its way out. Fluid pressure builds up, and it wriggles so as to pull its legs and wings out of their cases. The chrysalis splits along the back, and it keeps on wriggling to get out.
If you look at the chrysalis you can see that the legs, wings, tongue and antennae are all arranged stretched out straight, pointing away from the split.
Other insects do it in a simlar way. Flies have help from an inflatable bladder on their heads which fills with fluid to break a round lid off the hard pupal shell. If you squeeze a fly very gently, sometimes this bladder pops out.