First I'd like to give credit to Barristan for showing me this setup. Anyway fruit flies are attracted to light so they will climb up the cup. You should have a funnel of some sort going into the top of the cup so that the flies cannot escape but they can get in. You just simply place some sort of fruit to attract them in areas where fruit flies are abundant. When you are ready to feed, you can cover the top of the cup and place in the freezer to kill them.
The setup I have here is a very cheap homemade version that seems to work really well. You can experiment with various things to see what works. I just used a cup from McDonalds and a paper funnel that I taped together.
I placed this one by my compost bins which get a lot of attention from fruit flies. There are 25-30 flies in this one setup.