You can buy commercial traps.

But it's so easy to make your own.
Wine Bottle
Set an almost empty wine bottle with an inch of wine still in it on your counter. They will fly in there and not be able to get out.
Fruit Jar
Put a little vinegar - any kind but white wine vinegar - in the bottom of a small canning jar (the kind with the ring). Put a little piece of fruit in there. Cover the top with plastic wrap and screw on the jar ring. Poke a bunch of holes in the plastic. You can add a couple drops of dish soap and it'll make sure the flies stay in there.
I'd never realized this, but it makes sense: fruit flies breed like crazy in your drains. If you don't believe it (and to keep them in), cover the opening of your garbage disposal with duct tape. When you pull it off, there will be fruit flies stuck to it. Or you could keep that little lid on it. And run the garbage disposal frequently.
To clean out your drains: pour in some baking soda followed by boiling water with some vinegar in it. It'll foam up.
For other ideas, just google 'Fruit Fly Trap' and there is a bunch out there.
Here is one of them. Those little containers sitting on a lid from a deli container are film containers. With digital cameras, not everyone is going to have those on hand, but I'm sure you'll think of something.

I was just swatting them whenever I saw one sitting down, but I'm going to make one of these traps.