Insects evolved in the Ordovician from a crustacean ancestral lineage as terrestrial invertebrates with six legs (the Hexapoda). This was the time when terrestrial plants first appeared. In the Devonian some insects developed wings and flight, the first animals to do so. An early flying group was the Odonata from the Carboniferous, the damselflies and dragonflies, which have densely-veined wings and long, ten-segmented bodies. They are day-flying carnivores, with an aquatic larval stage, so are commonly seen flying near water. The carnivorous larvae are called nymphs. Odonata species are short-lived, damselflies surviving for 2-4 weeks, dragonflies for up to 2 months.
Some insect groups in the Cretaceous co-evolved with the flowering plants, and they have had a close association ever since. These groups are the Hymenoptera (bees, wasps, and ants), the Lepidoptera (butterflies and moths), the Diptera (flies), and the Coleoptera (beetles). The diversity of beetles is astonishing. Of all the known animal species on the planet, one in five is a beetle!