Mushrooms appear after spores have been carried by wind and landed on a moist, warm place such as the compost pile. Compost is transferred to the garden when planting vegetables and mushroom spores come along. In time, mycelium strands (white, hairlike roots of the mushroom) grow through the compost and produce a fruiting body.
Mycelium in the soil produce enzymes which break down decaying wood to create crumbly, black soil. Mushrooms in the garden prove evidence of decaying wood and leaves that are contributing nutrients for growing healthy plants.
Mushrooms will emerge when temperatures fall about 10 degrees after a cooling rain. If properly identified as edible, harvest using a trowel and promptly place in a brown paper bag to keep them dry and fresh until ready for use. If non-edible, discard the fungi to keep spores away from the compost.