Organic Composting Education

There are 3 components of composting necessary to have a successful compost pile:

AIR
WATER
FOOD
Composting microbes are aerobic - they can't do their work well unless they are provided with air. Without air, anaerobic (non-air needing) microbes take over the pile. They do cause slow decomposition, but tend to smell like putrefying garbage. So you need to make sure that your compost pile has plenty of spaces were air can escape.

Some compost ingredients, such as green grass clippings or wet leaves, mat down very easily into slimy layers that air cannot get through. Other ingredients, such as straw, don't mat down easily and are very helpful in allowing air into the center of a pile.

Ensuring Successful Air Microbes
To make sure that you have adequate aeration for your pile and its microbes, thoroughly break up or mix in any ingredients that might mat down and exclude air. You can also turn the pile to get air into it, which means completely breaking it apart with a spade or garden fork and then piling it back together in a more 'fluffed-up' condition.
Ideally, your pile should be as moist as a wrung-out sponge to fit the needs of compost microbes. At this moisture level, there is a thin film of water coating every particle in the pile, making it very easy for microbes to live and disperse themselves throughout the pile.

If your pile is drier than this, it won't be very good microbial habitat, and composting will be slowed significantly. If your pile is a great deal wetter, the sodden ingredients will be so heavy that they will tend to mat down and exclude air from the pile, again slowing the composting process (and perhaps creating anaerobic odor problems).

Ensuring Successful Water Microbes
If you are using dry ingredients, such as autumn leaves or straw, you'll need to moisten them as you add them to the pile. Kitchen fruit and vegetable wastes generally have plenty of moisture, as do fresh green grass clippings and garden thinnings.
Watch out for far-too-soggy piles in wet climates (a tarp may help to keep rain off during wet weather). In dry climates, it may be necessary to water your pile occasionally to maintain proper moisture. 
In broad terms, there are two major kinds of food that composting microbes need.
Browns
'Browns' are dry and dead plant materials such as straw, dry brown weeds, autumn leaves, and wood chips or sawdust. These materials are mostly made of chemicals that are just long chains of sugar molecules linked together. As such, these items are a source of energy for the compost microbes. Because they tend to be dry, browns often need to be moistened before they are put into a compost system.
Greens
'Greens' are fresh (and often green) plant materials such as green weeds from the garden, kitchen fruit and vegetable scraps, green leaves, coffee grounds and tea bags, fresh horse manure, etc. Compared to browns, greens have more nitrogen in them. Nitrogen is a critical element in amino acids and proteins, and can be thought of as a protein source for the billions of multiplying microbes.

Ensuring Successful Food Microbes
A good mix of browns and greens is the best nutritional balance for the microbes. This mix also helps out with the aeration and amount of water in the pile. Browns, for instance, tend to be bulky and promote good aeration. Greens, on the other hand, are typically high in moisture, and balance out the dry nature of the browns.