They breed in fruit, rotten potatoes, bits of mushroom or anything else vegetable and slushy. Kitchen-waste buckets are a favourite.
I find whenever I have a lot of fruit flies, it's because there's a disgusting bag of old potatoes somewhere that I'd forgotten about.
If you keep all fruit covered, the lid on the kitchen bucket, and don't leave things lying about, you'll not have too much of a problem.
Of course, they don't do much real harm, except if you're doing home brewing, when they can infect your brew with vinegar.