There are also anaerobic bacteria which do not need oxygen and do not produce heat, this process is much slower than the aerobic method and is smelly. The way to encourage the aerobic process is to turn the matreial to add air and to insulate the heap to keep in the heat. The woody material is broken down by fungi and takes the longest time. They also break down fallen leaves, from which the tree has extracted most of the nutrients. A process which does not require heat either, so producing leaf-mould is usually done separately and can be done in an open wire frame.
Moisture is also an essential for microbial activity.
As an indicator a handful squeezed very hard should produce a drop or two of water. Every particle should have a thin film of moisture to allow the microbes to live and move around. The size of material is a factor - the smaller, the faster decomposition occurs. So a shredder is a useful tool, but domestic models are rather tedious to use. Running the lawnmower over the material works quite well, but care must be taken not to damage the mower.