structural:scholar_edition
Larvae

The larvae or caterpillars are the first stage in the life cycle after hatching. Caterpillars are "characteristic polypod larvae with cylindrical bodies, short thoracic legs, and abdominal prolegs (pseudopods)". They have a sclerotized head capsule with an adfrontal suture formed by medial fusion of the sclerites, mandibles (mouthparts) for chewing, and a soft tubular, segmented body, that may have hair-like or other projections, three pairs of true legs, and additional prolegs (up to five pairs). The body consists of thirteen segments, of which three are thoracic and ten are abdominal. Most larvae are herbivores, but a few are carnivores (some eat ants or other caterpillars) and detritivores.

Different herbivorous species have adapted to feed on every part of the plant and are normally considered pests to their host plants; some species have been found to lay their eggs on the fruit and other species lay their eggs on clothing or fur (e. g., Tineola bisselliella, the common clothes moth). Some species are carnivorous, and others are even parasitic. Some lycaenid species such as Phengaris rebeli are social parasites of Myrmica ant nests. A species of Geometridae from Hawaii has carnivorous larvae that catch and eat flies. Some pyralid caterpillars are aquatic.

The larvae develop rapidly with several generations in a year; however, some species may take up to 3 years to develop, and exceptional examples like Gynaephora groenlandica take as long as seven years. The larval stage is where the feeding and growing stages occur, and the larvae periodically undergo hormone-induced ecdysis, developing further with each instar, until they undergo the final larval-pupal molt.

The larvae of both butterflies and moths exhibit mimicry to deter potential predators. Some caterpillars have the ability to inflate parts of their heads to appear snake-like. Many have false eye-spots to enhance this effect. Some caterpillars have special structures called osmeteria (family Papilionidae), which are exposed to produce smelly chemicals used in defense. Host plants often have toxic substances in them, and caterpillars are able to sequester these substances and retain them into the adult stage. This helps make them unpalatable to birds and other predators. Such unpalatability is advertised using bright red, orange, black, or white warning colors. The toxic chemicals in plants are often evolved specifically to prevent them from being eaten by insects. Insects, in turn, develop countermeasures or make use of these toxins for their own survival. This "arms race" has led to the coevolution of insects and their host plants.