You probably take for granted that your skin can expand by reproducing cells.
In order for an insect to grow in size, though, it must shed its old protective covering and replace it with a new one. This process is called a molt.
In some insects, environmental factors such as temperature and food availability control molting, while in others, the number of molts is fixed and is controlled by hormones.
To understand how molting occurs, it helps to know the parts of the insect exoskeleton, which can also be called the integument or skin. The insect exoskeleton consists of both living and non-living layers. The outermost layer is called the cuticle. It's non-living. The cuticle protects the insect against physical injury and water loss, as well as provides rigidity for muscle attachment. It's the layer that sheds during a molt.
Underneath the cuticle is the epidermis. The epidermis is the only cellular, or living, portion of the exoskeleton. It's responsible for secreting a new cuticle when it's time to shed the old one. Underneath the epidermis is the basement membrane. This membrane is what separates the insect's main body from its exoskeleton.
As for the molting process, first the epidermis separates from the cuticle. Second, the epidermis forms a protective layer around itself, and then it secretes chemicals that break down the innermost layer of the old cuticle. That protective layer becomes part of the new cuticle. When the epidermis has formed the new cuticle, muscular contractions and air intake cause the insect's body to swell, thus splitting open the remains of the old cuticle. Finally, the new cuticle hardens.