How composting works
Composting is controlled rotting. Leaves, kitchen scraps and garden trimmings break down on their own wherever they fall, but slowly and unevenly. A compost heap gathers that material in one place and gives the organisms that eat it what they need, so the same process runs faster, smells less and ends in a dark, crumbly material that improves almost any soil. Nothing about it is mysterious, and once you know what the heap needs, most problems explain themselves.
The workers in the heap
The real composters are living things, most of them too small to see. Bacteria do the bulk of the early work. They feed on the easy parts of fresh material, such as sugars and proteins, and they multiply quickly when food, water and air are all available. Fungi follow close behind and take on the tougher fibres in woody stems, straw and dry leaves. Their threads spread through the heap and open up material the bacteria cannot reach on their own.
Larger creatures arrive as the heap matures. Earthworms, springtails, mites, beetles and woodlice tunnel through the material, shred it into smaller pieces and mix it as they move. You do not need to add any of them. They come from the soil underneath the heap and from the material you put in, which is one reason a heap built directly on bare ground often gets going sooner than one sealed off from the earth.
What the organisms need
Every one of these workers needs four things: food, water, air and a reasonable temperature. Food comes in two broad kinds. Some material is rich in nitrogen, which organisms use to build protein and grow. Gardeners call it green, even when it is not green, because fresh grass clippings, vegetable peelings and coffee grounds are typical examples. Other material is rich in carbon, which supplies energy and structure. That is the brown material: dry leaves, straw, shredded cardboard and small twigs. A heap with a sensible balance of the two feeds its workers well. Our page on greens and browns covers that balance in detail, and the mix calculator on this site turns your own buckets and bags into a quick estimate.
Water matters because the organisms live in thin films of moisture on every particle. A heap that is too dry simply stops. A heap that is too wet fills its air spaces with water, which pushes out the oxygen the most useful organisms rely on. The usual target is damp like a wrung out sponge: moist to the touch, but not dripping when you squeeze a handful.
Air is the part most often forgotten. The organisms that break material down quickly and without bad smells need oxygen. When oxygen runs out, other organisms take over. They work more slowly and produce the sour or rotten smells that give compost a bad name. Coarse material, turning the heap now and then, and not packing it down all help keep air moving through it.
Heat and the stages of a heap
A heap with enough material, moisture and air warms up as its organisms feed. That warmth is a sign of activity rather than a goal in itself. A small heap may only ever feel slightly warm in the middle, and it will still turn into compost, just more slowly. A larger heap can become hot enough to feel clearly through a glove for a few days or weeks. As the easy food runs out, the heap cools again and the slower organisms, fungi and worms take over the finishing work.
Many gardeners describe three loose stages. First comes a busy, warm stage in which fresh material shrinks quickly. Then a long cooler stage follows, in which the heap settles and darkens. Last comes curing, in which the material rests until it smells earthy and the original ingredients are hard to recognise. The stages blur together in a heap you keep adding to, and that is fine.
What you control
You cannot control the weather or the exact mix of organisms, but you control nearly everything else. You choose what goes in and in what proportion. You decide how big the pieces are, since smaller pieces give organisms more surface to work on. You manage moisture by adding dry material or water. You manage air through structure and turning. You also choose the container, which affects heat, moisture and how easy the heap is to turn. Our comparison of compost bins walks through those choices.
How long it takes
There is no single answer. An actively managed heap with a good mix can produce usable compost in a few months. A heap that is simply added to and left alone can take a year or more. Both approaches are valid. The slower method asks less of your time, and the faster one gives you compost sooner. When you are deciding which suits you, our page on hot and cold composting sets the two side by side.