The mass of hyphae that forms the vegetative body of a fungus is called mycelium.
Hyphae are microscopic, thread-like filaments. They branch and interweave to create the larger mycelial network, which is the main growing and feeding body of most filamentous fungi. The visible mushroom is usually only the reproductive fruiting body, not the entire fungus.
Mycelium absorbs nutrients by releasing enzymes into soil, wood, leaf litter, or another substrate. A spore may germinate into mycelium, and compatible mycelia can join before producing a mushroom. Some mycelial networks are tiny, while Armillaria colonies can occupy thousands of acres.
A common mix-up is treating mycelium as a plant-like root. It may look root-like, but it is made of fungal hyphae and does not perform the same functions as true roots. A compact, hardened mass of mycelium is instead called a sclerotium.