A mushroom is the fruiting body of a fungus. It is not a plant, it is a fungus. It eats organic matter and doesn’t photosynthesize like most plants do. Although mushrooms do absorb carbon dioxide and exhale oxygen, but this process is a bit to complicated to explain.
They typically grow on soil or on organic matter like woodchips, seeds or compost.
A mushroom is, just like an apple, the fruiting body of a living organism. An apple contains seeds which are needed to reproduce and so do mushrooms. Mushrooms contain thousands of microscopic spores responsible for the reproduction of the fungus.