Decomposers are the organisms that eat, digest and break down once living things which have died. They are absolutely essential in the nutrient cycles. In essence, all living things, including humans, are borrowing the elements that make up their bodies. On death we need to recycle them back so other plants and animals can use them.
Recycling the elements is essential. Some say that without our decomposers we'd be wading through deep garbage. I figure that we'd never have existed at all - there wouldn't have been any elements available to make up our bodies. Both bacteria and fungi are primary decomposers at work in the compost pile, however here we'll focus on bacteria.
Bacteria dominate the early process in compost and probably will make up 80 to 90 % of compost microbes. Most bacteria found in soils and in compost are decomposers. A teaspoon of fertile soil can contain anywhere from 100 million to a billion bacteria with representatives from 10,000 species. Compost might have ten times that number of bacteria in its teaspoon.
Bacteria feed on simple, easy to metabolize, carbon compounds such as fresh young weeds and leaves and the compounds present in the root zones. Plants actually create these compounds to ensure a healthy, diverse population of bacteria lives near their roots to protect the plants.
Decomposers are especially important in retaining nutrients in their cells thus preventing loss of those nutrients from the root zone. This is very important in the nitrogen cycle. Worldwide, about 1200 million tons of fixed nitrogen circulates annually between growth and decomposition primarily with the decomposer bacteria. Without these bacteria immobilizing the fixed nitrogen, keeping it in the root zone, much of it would be lost to the air and water.
Some bacteria decomposers are able to break down more complex materials such as pesticides, herbicides and other soil pollutants. These bacteria are used to clean oil spills and neutralize agricultural chemicals in processes called bioremediation.
The bacteria thrive in various micro habitats. Scientists often classify them by their temperature preference. Like Goldilocks's Three Bears some like it hot, some like it cold and some like it just right. Because the temperature in a compost process often goes through all the temperature ranges over the course of time, a full range of bacteria may be part of your compost process.
I think most of us think we really need to get our compost really hot for at least two or three days to sterilize or sanitize the compost. The problem is that when temperatures get very hot your species diversity in the compost drops alarmingly. Because your now pretty sterile compost lacks diversity it paves the way for one or more species to overrun the place. For example salmonella might move in and without the usual salmonella eaters around - because they've been wiped out by the heat - the salmonella goes nuts and you've got a problem.
In his great book, The Humanure Handbook, Joseph Jenkins reports the results of a number of studies showing maybe we don't need the heat.
The bottom line is that a goal of totally pathogen free soil is not ideal. You want the natural defense mechanisms you'll find in biodiverse soil to have some of the bad guys to practice on.
You may also want to check out Decomposer Fungi.