Fruit flies tend to be drawn to any sources of rotten or fermenting food. They reproduce by laying eggs (up to 500) among organic waste. The larvae, maggots, will then hatch and feed. The lifecycle from egg to adult can be completed in about a week.
Sarah Palin drew liberal criticism in the 2008 presidential election for pointing to fruit fly research in Paris, France as an example of poor use of public funds. Unfortunately for the liberals who defended the project based on D. melanogaster genetic progress the research Palin was highlighting had nothing to do with genetics; the study in question was focused on the ecology of the Olive Fruit Fly.