Fungus gnats are tiny, dark-colored flies that are commonly seen around lamps and windows. They are annoying, but harmless and do not significantly damage indoor plants.
The larvae breed in moist soil, primarily in potted plants containing lots of organic matter. Larvae feed on fungi in the damp soil. They can also breed in drains with a buildup of moist debris.
Overwatering indoor plants contributes to the growth of the fungi on which the larvae feed.