After 4 or 5 days, the egg is ready to hatch. The caterpillar, or larvae, eats its way out of the egg. It spends most of its time eating. When caterpillars grow too big for their skin, they shed it. This process is called molting.
Caterpillars molt several times.
Then they attach themselves to a leaf or stem by spinning a silk button. The skin quickly hardens into a shell called a chrysalis. Inside the chrysalis, caterpillars slowly change into butterflies. When butterflies emerge from the chrysalis, they extend their wings by pumping blood into them. It usually takes a couple of hours for the wings to dry and harden, then the butterflies can fly.