Butterflies are part of the class of insects in the order Lepidoptera, along with the moths. Adult butterflies have large, often brightly coloured wings, and conspicuous, fluttering flight. The group comprises the large superfamily Papilionoidea, along with two smaller groups, the skippers (superfamily Hesperioidea) and the moth-butterflies (superfamily Hedyloidea). Butterfly fossils date to the Palaeocene, about 56 million years ago.
Butterflies have the typical four-stage insect life cycle. Winged adults lay eggs on the food plant on which their larvae, known as caterpillars, will feed. The caterpillars grow, sometimes very rapidly, and when fully developed pupate in a chrysalis. When metamorphosis is complete, the pupal skin splits, the adult insect climbs out and, after its wings have expanded and dried, it flies off. Some butterflies, especially in the tropics, have several generations in a year, while others have a single generation, and a few in cold locations may take several years to pass through their whole life cycle.
Butterflies are often polymorphic, and many species make use of camouflage, mimicry and aposematism to evade their predators. Some, like the monarch and the painted lady, migrate over long distances. Some butterflies have parasitoidal relationships with organisms including protozoans, flies, ants, and other invertebrates, and are predated by vertebrates. Some species are pests because in their larval stages they can damage domestic crops or trees; other species are agents of pollination of some plants, and caterpillars of a few butterflies (e.g., harvesters) eat harmful insects. Culturally, butterflies are a popular motif in the visual and literary arts.
The earliest Lepidoptera fossils are of a small moth, Archaeolepis mane, of Jurassic age, around 190 million years ago (mya). Butterflies evolved from moths, so while the butterflies are monophyletic (forming a single clade), the moths are not. The oldest butterflies are from the Palaeocene MoClay or Fur Formation of Denmark. The oldest American butterfly is the Late Eocene Prodryas persephone from the Florissant Fossil Beds.
Traditionally, the butterflies have been divided into the superfamily Papilionoidea and the smaller groupings of the Hesperioidea (skippers) and the more moth-like Hedyloidea of America. Phylogenetic analysis suggests that the traditional Papilionoidea is paraphyletic with respect to the other two groups, so they should both be included to form a single butterfly group, the clade Rhopalocera.
Butterfly adults are characterized by their four scale-covered wings, which give the Lepidoptera their name (Ancient Greek λεπίς lepís, scale + πτερόν pterón, wing). These scales give butterfly wings their colour: they are pigmented with melanins that give them blacks and browns, as well as uric acid derivatives and flavones that give them yellows, but many of the blues, greens, reds and iridescent colours are created by structural coloration produced by the micro-structures of the scales and hairs.
As in all insects, the body is divided into three sections: the head, thorax, and abdomen. The thorax is composed of three segments, each with a pair of legs. In most families of butterfly the antennae are clubbed, unlike those of moths which may be threadlike or feathery. The long proboscis can be coiled when not in use for sipping nectar from flowers.
Nearly all butterflies are diurnal, have relatively bright colours, and hold their wings vertically above their bodies when at rest, unlike the majority of moths which fly by night, are often cryptically coloured (well camouflaged), and either hold their wings flat (touching the surface on which the moth is standing) or fold them closely over their bodies. Some day-flying moths, such as the hummingbird hawk-moth, are exceptions to these rules.
Butterfly larvae, caterpillars, have a hard (sclerotised) head with strong mandibles used for cutting their food, most often leaves. They have cylindrical bodies, with ten segments to the abdomen, generally with short prolegs on segments 3–6 and 10; the three pairs of true legs on the thorax have five segments each. Many are well-camouflaged; others are aposematic with bright colours and bristly projections containing toxic chemicals obtained from their food plants. The pupa or chrysalis, unlike that of moths, is not wrapped in a cocoon.
Many butterflies are sexually dimorphic. Most butterflies have the ZW sex-determination system where females are the heterogametic sex (ZW) and males homogametic (ZZ).