True flies are insects of the Order Diptera, possessing a single pair of wings on the mesothorax and a pair of halteres, derived from the hind wings, on the metathorax. The presence of a single pair of wings distinguishes true flies from other insects with "fly" in their name, such as mayflies, dragonflies, damselflies, stoneflies, whiteflies, fireflies, alderflies, dobsonflies, snakeflies, sawflies, caddisflies, butterflies or scorpionflies. Some true flies have become secondarily wingless, especially in the superfamily Hippoboscoidea, or among those that are inquilines in social insect colonies. It is a large order, containing an estimated 240,000 species of mosquitos, gnats, midges and others, although under half of these (about 120,000 species) have been described. It is one of the major insect orders both in terms of ecological and human (medical and economic) importance. The Diptera, in particular the mosquitoes (Culicidae), are of great importance as disease transmitters, acting as vectors for malaria, dengue, West Nile virus, yellow fever, encephalitis and other infectious diseases.
Diptera are a diverse order with an enormous range of ecological roles. Every type of trophic level pattern can be seen in the Diptera. Dipteran predators include the robber flies (Asilidae). A variety of herbivores can be found in the Diptera, such as the economically important fruit flies (Tephritidae). Flies are often parasites, including internal parasites such as the bot fly and external parasites such as the mosquito, black fly, sand fly or louse fly. Myiasis is the special term for diseases cause by flies (such as the screw worm fly) infecting living tissue. Many flies eat dead organic matter (detritovores), plant or animal remains. This is especially common in the larval stage, seen in the filter-feeding mosquitoes and black flies, the dung-feeding blow flies (Calliphoridae), or the organic deposit feeding rat-tailed maggot. A number of taxa feed on blood, including horse flies and mosquitoes. Some flies can be important pollinators for many species of plant, many such fly-specialized plants, such as Stapelia, Rafflesia, and Aristolochia, produce carrion odors, and many flies feed on pollen and nectar of common plants, and can perform incidental pollination. Similar relationships occur between flies and various fungi, with flies dispersing the fungal spores.
The basic life cycle of a fly is egg, larvae, pupa and adult (winged stage), called holometabolism. There is often a difference in food sources for larvae versus adult dipterans of the same species. For example, mosquito larvae live in standing water and feed on detritus while the adults feed on nectar as their energy source while females utilize blood as their energy source for egg production. Various maggots cause damage in agricultural crop production, including root maggots in rapeseed, midge maggots in wheat, and numerous species of leaf miners (note that since fly maggots have no legs, they almost exclusively feed internally on plants). Flies rely heavily on sight for survival. The compound eyes of flies are composed of thousands of individual lenses and are very sensitive to movement. Some flies have very accurate 3D vision. A few, like Ormia ochracea, have very advanced hearing organs.