Like the rest of the family, it's a saprobic fungi.
Fungus, unlike plants and animals—obtain food by absorbing nutrients from an external source. Fungi lack chlorophyll, the green pigment that enables plants to make their own food. Consequently, fungi cannot synthesize their own food the way plants do. In order to feed, fungi release digestive enzymes that break down food outside their bodies. The fungus then absorbs the dissolved food through its cell walls. Since they depend on outside sources for food, fungi have developed various living arrangements that enhance their opportunities for food absorption.
Most fungi are saprobes. A saprobe is an organism that derives its nutrition from the dead remains of other organisms; a scavenger, if you will. Saprobic fungi usually live on dead vegetable matter (sticks, leaves, logs etc), as they are the only multi-celled organisms that can digest the structural proteins cellulose and lignin, the two major components of wood. Most yard and garden mushrooms are saprobes, as well as dung-loving mushrooms and mushrooms that decompose leaf or needle litter.