Composting can take many forms. The photo below was taken at a commercial composting company. As a pile settles, airspace is reduced. The main reason for turning a pile is to restore aeration. The pile is fluffed up as it is turned, increasing air capacity and airflow. Turning also eventually subjects all of the material to the same conditions, creating a consistent product. Since only the center of the pile reaches high heat levels, the pile will need to be turned several times before all of the material has been subjected to enough heat to kill pathogens and viable seeds.
Convection causes air to enter the sides of the pile and leave at the top. The material in the piles needs to have a structure that allows airflow. Horse manure is one material that has the proper structure. Most materials though require mixing with a bulking agent such as wood shavings. We usually want the bulking agent to compost enough that it can be left in the finished product. But sometimes it is screened out and reused in another batch of compost.
Temperatures are regulated by keeping piles at the proper moisture level. A wet pile holds less air and restricts airflow, reducing biological activity, and thus keeping the pile from overheating. Piles are kept wetter during the initial thermophilic (high heat) stage. As the thermophilic bacteria become less dominant, moisture levels are decreased somewhat to allow more air into the pile. At this point, the pile starts to transition from a bacterial to a fungal dominated environment, which actually favors lower moisture levels. Some people stop turning piles during the final stage to prevent damaging fungal hyphae strands.
Windrows can also be static, meaning they are not turned. A perforated pipe is laid on the ground and the windrow laid on top of it. Air is blown into the pipe. In order to get the whole pile hot enough to kill pathogens and seeds, everything needs to be done just right. Forced air is also sometimes used on material placed in concrete bays. These bays are usually made by stacking two-feet thick concrete blocks on 3 or 4 sides. These blocks can help increase the uniformity of temperature, which is important in static piles.
Organic materials will of course rot and turn to dirt if they are just thrown on the ground in no special way. Some people purposely compost on a small enough scale to keep temperatures fairly low, citing certain desirable characteristics that can be damaged by heat.
And of course some people just keep throwing material on top of a cold pile as they need to toss it, then dig out of the bottom when they need to use it. There is absolutely nothing wrong with that. If you want to produce heat though, one cubic yard of material started all at once is enough to do it. A half-and-half mixture of leaves and grass clippings works. As previously mentioned, horse manure by itself works, although it is okay if it does contain a little bedding. Dairy manure needs to be thoroughly mixed with lots of bedding or other bulking agent. Thousands of different mixtures will work.
Some people prescribe a magic 30:1 carbon/nitrogen ratio. This ratio, determined mostly by the types and amount of “green” and “brown” materials should only be used as a rough guide. And calculating any ratio only makes sense when the brown materials are not high in lignin or composed of thick particles. Even then, it is possible to compost mixtures that are not even close to this ratio. Some people believe in a “richer” compost with much less carbon. Producing something like that requires much less bulking agent and much more frequent turning.