Maggots hatch out of tiny fly eggs. Flies leave hundreds of eggs where the maggots will have something to eat while they grow and mature. Most maggots do not survive to become flies though, fortunately for the balance of nature. However, those that do survive get their wings through a process known as metamorphosis.
Metamorphosis means transformation in Greek. In English, it's a term for the way insects change. All insects mature in one of three different ways. The most primitive insects are born as miniature adult insects. An immature silverfish, for example, looks almost exactly like a mature one, except it is smaller. This kind of life cycle is called ametabolism.
The second kind of insect growth pattern includes a nymph stage between the egg and the adult stages. Dragonflies, for example, mature this way. The nymph stage looks much like the adult dragonfly, but it has stumps where the adult will have wings. The process that a dragonfly goes through is called incomplete or simple metamorphosis, because a dragonfly does not change completely, it merely grows wings.
Complete metamorphosis is what wasps, beetles and butterflies go through, and so do flies. Larvae emerge from the eggs. They look completely different than their parents, usually live in different environments and have different habits. They eat and grow, and then they pupate, passing through a period of transformation in which they become adults.
Maggots and flies
Maggots have chewing mouth parts. Flies suck up their food through tongues shaped like straws. To do that, they first vomit a combination of digestive enzymes and saliva on it to soften it.
Flies have huge compound eyes (relatively), that show them everything all around them. Maggots do not have compound eyes.
A housefly maggot looks rather like a pale pointy worm, while a housefly is a complicated creature. It has veined glassy-looking wings, and possibly has large red eyes. Of course, there are all sorts of flies, over 100,000 species. They are found on every continent, including Antarctica, and all of their young are maggots.
Lifecycle of a fly
A female fly leaves hundreds of eggs somewhere her hatchlings will have something to eat. She may choose a compost pile, for example, cow droppings in a pasture or spilled garbage. If the weather is warm and the environment is moist, housefly eggs will hatch within a day. A housefly maggot eats and grows for about five days, then becomes a pupa.
A pupa is enclosed in a brownish covering. It does not eat, and it moves very little. It is transforming into a fly. After three to six days, it expands a pouch on its head to break open its casing. It crawls out, with its wings still moist and soft. Once the air has dried its wings, it is ready to fly. In two or three days, it will be able to reproduce, to make more maggots.