The so-called "complete metamorphosis" of moths and butterflies from larva to pupa to adult must be considered one of the most astounding transformations in nature.
I have been following this process in Hyalophora cecropia, commonly known as the "Cecropia moth" and one of North America's largest moths, with wingspans reaching 6 inches or more.
Last year I purchased some eggs. The cecropia moth caterpillars feed on a wide variety of host plant leaves including cherry, birch and maple - and they feed on the leaves of the lilac bush that grows just outside my door here on the Front Range of the Rocky Mountains.
The eggs are tiny - about 2 mm in diameter, and the hatchling caterpillars are black with spiky protuberances called "scoli" that apparently serve a defensive purpose.
The caterpillars eat their way through the egg shells and immediately begin consuming leaf material - an endeavor which they will pursue without pause for about six weeks until they spin cocoons and pupate within.
As they feed and grow they go shed their skins five times. The hatchlings are called "1st instar" larvae, the the largest caterpillars are called "5th instar" having shed their skins 4 times.
There is an interesting article here whose abstract states, "The morphology of the variously coloured scoli (bristle-bearing structures on the integument, producing an exocrine secretion) on caterpillars of Hyalophora cecropia and the secondary chemistry of the discharged secretions have been investigated for the first time and compared. According to our scanning electron microscopic study, the red/orange, yellow and blue coloured groups of these glands differ morphologically. Gas chromatographic-mass spectrometric analyses showed that the patterns of secondary compounds in the respective glandular secretions are also different. Furthermore, the secretion of the penultimate larval instar is chemically distinct from that of the last instar, as are both secretions from the respective haemolymph. The results favour the idea that the differences in scoli colour, morphology and chemistry could affect various predator species differently."
So the above paper suggests that not only are the variously-colored scoli different in form and structure, but that the chemical compounds they release are different [gas chromotography/mass spectrometry is a method for separately complex mixtures and then determining the chemical structures of the components]. A pretty impressive defensive tool box for the caterpillars.
The 5th instar larvae [who have shed their skins 4 times] spin cocoons, and shed their skins again to become pupae. They overwinter inside their cocoons and the the pupae shed their skin and "eclose" from the cocoons as adult moths.
Ten or eleven months later
During the long time the pupa are in the cocoon, dramatic changes are taking place. Body structures such as the scoli, the mouthparts, and even the fleshy pairs of prolegs that support most of the caterpillar's movement and support the rear two-thirds of its body disappear. Completely new structures appear such as antennae, large compound eyes, and most dramatic of all the large cinnamon-colored furry-looking wings.
Around mid-day, the pupa sheds its skin, and the adult moth pushes through the loosely-woven top of the cocoon and crawls out. Within about half an hour, its wings expand and set.
Male adults have plumose ["feathery"] antennae that are used to detect the pheremones secreted by female adults. The female antennae, in contrast, are much less expansive.
By far the most striking feature of adult Cecropia moths are the wings: large, strong, and "furry", with dramatic features on both the fore and hind wings. All of the coloration is from tiny scales that reflect different colors of light.