Answer: What you describe is probably a fungus gnat; where there is one, there will be several. Fungus gnats feed and breed in decaying organic matter (potting soil) so to control them you only need to place a barrier between the potting soil and the gnats. You can do this with a temporary layer of plastic wrap on the soil or by putting gravel over the top of the soil. You can also catch them by placing a glass or jar on the windowsill, with an inch or so of vinegar in it. The gnats will be attracted to the odor, fly in and drown.
Basil can be started from seed or purchased as a small plant. It does well in a very bright sunny window. Fertilize occasionally with a water soluble fertilizer according to the label directions. Snip the basil frequently to encourage it to grow bushier. This plant is an annual and will not be terribly long lived, so plan on replacing it every few months, especially if you harvest from it often. Seed is easy to start.
Best wishes with your indoor herb garden!
Q&A Library Searching Tips