Learn about this topic in these articles:

characteristics of Diptera

...beneficial, too, functioning as scavengers, predators, or parasites of certain insect pests, as pollinators of plants, and as destroyers of weeds noxious to humans. Dipterous larvae, often called
maggots or grubs, are found in many habitats (
e.g., in any kind of water, in plant tissue and soil, beneath bark or stones, in decaying plant and animal matter, even in pools of crude...

In contrast to highly specialized larvae, about half the fly species have larvae known as
maggots. The
maggot has lost the complicated head capsule of primitive flies; its pointed anterior end contains one or a pair of mouth hooks. The blunt posterior end has a pair of posterior spiracles (external airholes) that appear to the naked eye as black spots. Microscopically the spiracles are seen as...

prevention of infection

...blow flies feed on a variety of materials, but the larvae of most species are scavengers that live on carrion or dung. The adults lay their eggs on the carcasses of dead animals, and the larvae (
maggots) feed on the decaying flesh. The larvae of some species (e.g.,
Calliphora, Cochliomyia) also sometimes infest open wounds of living animals. Although these larvae may assist in...