The small black insects flying around your houseplants or sitting in the soil are fungus gnats. They do not affect the plant badly except for their larvae in the soil. However, their presence seems to be annoying.