A insect has a outer shell that is called an exoskeleton. This shell protects the insect from smashing if it falls, and other dangers.
But because the Exoskeleton is so hard the insect has to shed it before growing.
(You will most often see a cicada exoskeleton.)
When the insects exoskeleton gets too small the insect begins to grow a new one under the old shell.
This new exoskeleton produces a chemical that loosens the old shell.
Then the insect begins to take in huge breaths and stretches it's self. This loosens the old shell and then is breaks open and the insect can come out a new insect.