A fungus and a mushroom are related but distinct entities. The difference between a fungus and mushroom is similar to the difference between a plant and a fruit.

Some plants create fruit for reproduction. Similarly, some fungi create mushrooms for reproduction.

Fungus:
Fungi are a diverse group of organisms that belong to their own kingdom, known as Fungi. They are distinct from plants, animals, and bacteria. Fungi are eukaryotic, meaning their cells contain a nucleus and other membrane-bound organelles. They obtain nutrients by absorbing organic matter from their environment. Fungi can be found in various habitats, including soil, water, and even within other organisms. They play important ecological roles as decomposers, symbionts, and pathogens.

Fungi that do not produce mushrooms include yeast, mold, and the plant pathogen known as powdery mildew.



Mushroom:


Mushrooms, on the other hand, are a specific type of fungus that produces a distinct reproductive structure called a mushroom. A mushroom is the visible part of a fungus and serves as the means of reproduction. It typically consists of a cap (pileus) on top, a stalk (stipe) supporting the cap, and often gills or pores underneath the cap. The purpose of the mushroom is to produce and disperse spores, which are the fungal equivalent of seeds.

Not all fungi produce mushrooms, and not all mushrooms have the classic toadstool shape we commonly associate with mushrooms. There are many different types of mushrooms, varying in size, shape, color, and habitat. 

In summary, the main difference between a fungus and a mushroom is that a fungus is a broader group of organisms, while a mushroom is a specific reproductive structure produced by some fungi. The fungi that produce mushrooms will often still remain alive and active long after the mushroom is gone. Mushrooms are just one form of fungal fruiting body used for spore production.