SPONTANEOUS GENERATION!!!!!! …Just kidding. :) (Science jokes: symptom of too much lab time!) They come from the environment – their eggs are usually carried in on fruit you buy in the store (I know, ICK ICK). If you leave your fruit out long enough, the eggs hatch and they fly around your house looking for other fruit to eat. If you leave fruit for a looong time you see a huge boom of fruit flies because it gives them ample time to reproduce on that lovely food source you’ve left out for them. They really like mushy stuff like peaches and bananas, or anything rotten. Try making a little trap for them, like putting apple cider vinegar with a drop of dish soap in a jar on the counter. They’ll fly in because it smells like rotting fruit, but they drown in the vinegar.