Fungi are the cause of much decomposition, but of course, they, too become rotted - other fungi, insects, moulds, bacteria and even vertebrates participate in the decay - in some species the fruiting bodies last less than a day before total dissolution, others can last for years.
Of course the mushroom we see is just a fruiting body - confusing a mushroom with the fungal organism that sprouted it is very much like confusing an apple with an apple tree, only in the case of fungi the 'tree' is almost invisible, while the fruits are very obvious.
While the fruit comes and goes in its season, the rest of the fungus persists, living and growing in the earth, or other substrate out of which the mushroom appeared. It is always there - but invisible - all through the year, ready to sprout further mushrooms, when the conditions are right.
|Boletus erythropus - Red-legged Bolette|
...and then the same mushroom again, ten days later: