The indoor black flies around your plants are called Fungus Gnats. They, themselves, are harmless to your plants but the they leave eggs underneath the soil and the larvae that hatch interfere with root development and can kill the plants. Do not ignore the fungus gnats, they are more than just annoyance.
There are many ways to kill the flies but this will not solve the problem. As long as you water the plants from the top and the surface of the soil is moist, the eggs will continue to hatch new larvae. You have to water the plants only from the bottom and keep the surface dry.
After a lot of reading on the topic, watching the videos below (and more), I have found that the simplest way to get rid of fungus gnats is a 2-step plan:
1. Eliminate the adult flies with a sticky tape/trap. The cheapest option is to buy a fly ribbon ($1 in many stores), cut it in 2-inch pieces and tape them on the rim of the pots (2-3 pieces per pot). PIC Fly Ribbon works really well and it is sticky on both sides (one side for the flies, the other side for the rim of the pot)/
2. Eliminate the eggs by keeping the surface of the soil dry. Never water from the top apart from the time of planting.
That is all, and it really works.
I have found that spraying with Neem oil is ineffective in controlling the fungus gnats. In fact, the moisture from the spray makes them multiple in 1-2 days.
The solution shown in the video below - applying Vaseline to sticky notes - also does not work. The Vaseline dries on the paper before it can trap any flies.
"World's Simplest & Cheapest Way to Get Rid of Fungus Gnats" - YouTube http://bit.ly/XeUghM - Editor's note: This method did not work for me at all. See the 2-step plan above.
Comment from Praxxus55712: "Good tips. I like the vaseline on the yellow paper. They can't resist bright yellow. The vaseline holds them perfectly. I noticed you included bottom watering. *high five*. Keep the soil surface dry.
A quick method to slow or stop them is to remove a layer of soil from the top of the soil of the pots. Toss this soil in a sealed bag and throw it in the outdoor trash. It must be tossed away because it is infected. Spread a layer of fine vermiculite or perlite or pure sand on the pot to form a solid barrier from edge to edge of the pot. A solid layer is needed. One bare spot will make this fail. Water from the underside drip tray instead of the top.
Pretty much any insect spray will kill gnats. If they're fungus gnats then you have a war on your hands because their children are deadly to your plants."