"Fungus gnats spend the majority of their lives in the larval and pupal stages. During their larval stage, they appear translucent and worm-like, with a black marking on their head. As larvae, they live in soil and feed on the roots of plants and seedlings. It’s common for fungus gnats to move indoors if you bring outdoor plants in for the winter."
"Are they fungus gnats or are they fruit flies? This is a good question because fungus gnats are commonly mistaken for everyday fruit flies, though there is a difference between the two. Here is some information about fungus gnats that can help you figure out what is causing your infestation."