A fruit fly is a fly which is associated with fruit. Two different families of flies are commonly known as fruit flies, which can be confusing for people who are not familiar with the details of fly life. When most people talk about “fruit flies,” they mean flies in the family Drosophilidae, often specifically Drosophilia melanogaster, the common fruit fly. However, flies in the family Tephritidae are also sometimes called fruit flies.
In the case of flies in the family Drosophilidae, fruit flies are flies which live on ripe and fermenting fruits. They specialize in using the yeasts which arise during the fermentation process for food, and they have highly-attuned chemical sensors which allow them to identify delicacies like rotting bananas and peaches. Fruit flies don't just eat the fruit, they also use it as a substrate to lay eggs, with the maggots burrowing into the fruit to feed on the pulp inside.
The life cycle of a common fruit fly is dependent on the ambient temperature, but it can be anywhere from two weeks to two months. Fruit flies can become a huge problem in the kitchen, especially in the summer, because once they are established, they will actively seek out sources of food. Keeping a kitchen clean and ripening fruit covered will help to reduce and discourage the fruit fly population, and it is also possible to use fly traps to cope with a fruit fly influx.
These fruit flies are small and yellow to tan in color, and they are especially popular in scientific research. Because of their short life span, it is popular to rear multiple generations very quickly for the purpose of studying genetics, and the genetic code of the fruit fly also happens to be remarkably similar to that of humans, leading some researchers to study fruit flies with the goal of learning more about humans. Research on the lifespan of fruit flies in particular has revealed some interesting information which could be used to extend human lifespans.
Flies in the family Tephritidae may be called fruit flies, but they operate differently than their relatives. These flies actively burrow into fruits and vegetables as they grow, causing systemic damage. They are regarded as crop pests, because they can destroy a crop before its even harvested, unlike the fruit flies in the family Drosophilidae, which primarily feed on fruit which has already been harvested and sold.