Disregard all the above posts (sorry)... they're not fruit flies, so the apple cider vinegar trick won't work.
These are fungus gnats. They're small, black, and have pointy abdomens, and as the name suggests, they eat fungus. They tend to occur only around pot plants in houses because of overwatering, so the soil gets a little mouldy, and they thrive.
You have three options:
Pesticides won't work by the way... these live in the soil so spraying will just kill the adults.
Either treat with nematodes, (microscopic worms) that eat the larvae (fly babies). These are mixed with water, poured on via watering can or similar... but the soil must be kept wet for these to work. Look for Steinernema feltiae, costs about £10-15 from ebay/Dragonfli websites.
The other option is a small mite called Hypoaspis (new name: Stratiolaelaps). It crawls around on the soil, and eats larvae too. This does not need to be kept wet, but is about 90% as good as the nematodes. Costs the same.
Option three is drying out. The fly likes wet environments because the fungus likes wet environments. Drying out the plant so the fungus dies will reduce numbers.
The treatments above are child and pet friendly, won't infest anything else, and will keep working for many months. You can also treat many plants with them, and even outdoor plants.
You could also tuck a yellow sticky trap behind the plant to catch the adults. These bugs are little sh!ts and will preferentially aim for your nose and eyes...