The cuticle of an insect is made up of several layers: the Endocuticle (produced after moulting, added basally by epidermal cells on a daily basis), the Exocuticle (where chitin is formed before moulting) and the Epicuticle. Pictured below is the insect cuticle:
Ecdysis (moulting) is controlled by juvenile hormone and ecdysis-triggering hormone. The process is delicate and the insect must stop all activities as moulting may take several hours. Hypodermal cells secrete enzymes to digest the thick endocuticle and then absorb the material back into the body. Once the new layers are secreted, the insect expands itself in size by gulping in air. Contraction of body wall muscles forces the old exo- and epi-cuticle to rupture and the entire body is freed from its own skin (and the trachea, foregut and hindgut are withdrawn with it). The new pale endocuticle can now be tanned, and once complete the air in the gut is released. 90% of the old cuticle is recycled, with all the old cuticle completely replaced with an increase in body size with no increase in weight. Hemimetabolous insects like the cicada (shown below) used this process to proceed through instars (different stages of nymph). In insects with this incomplete metamorphosis, there are usually 3-5 instars of progressive size (or more if there is a shortage of food, for example).
Find out why the exoskeleton and the process of moulting is so important for insects here.
Find out how complete metamorphosis works here.