How to compost
Composting involves mixing yard and household organic waste in a pile or bin and providing conditions that encourage decomposition. The decomposition process is fueled by millions of microscopic organisms (bacteria, fungi) that take up residence inside your compost pile, continuously devouring and recycling it to produce a rich organic fertilizer and valuable soil amendment.

Location
Where you put your composting bin/pile depends on function and aesthetics. The backyard, or, if you don't have one, a compost bin located in your basement works. You'll need a place with good air circulation. Don't place it next to your home or other wooden buildings as the decomposing scraps and resulting compost may cause the wood to rot. You'll also probably not want it by your picnic table or other areas outdoors where you entertain. Partial shade is a good idea so the compost doesn't get overheated. Also make sure the spot of land where you place your heap gets good drainage.
Appearance
You can build your own bin by converting old shipping pallets. You can also skip the bin (a structure isn't essential) and just have a compost pile or heap. Yyou may want to screen the pile from view by planting shrubs or a fence.
Size
Make your pile no smaller than 3' x 3' x 3'. In fact, this is probably the perfect size. It's sufficient enough to "cook" your waste and transform it into compost, but not so large that it will become unmanageable and hard to turn.
Moisture
The microbes that do your dirty work in the compost pile require water for survival, but it can be hard to judge how much water to add and when. Too much water means your organic waste won't decompose and you'll get a slimy and smelly pile that could well answer to the name "swamp thing." Too little water and you'll kill the bacteria and you won't get your compost.
One rule of thumb: the more green material (cut grass, weeds, leaves) you put in, the less water you'll need to add. In fact, if you need to add dry ingredients such as straw or hay, soak the material first in water so it won't dry out your compost pile. In general your compost should be moist, but not sopping wet.
If you are backyard composting and you get a lot of rain, build a roof over the pile. This can be as simple as a tarp. The reason you want to give your compost pile more shelter is because nutrients, or leachates, leak out when it rains. That's not such a problem in a place where rainfall isn't heavy, but if you get a lot of rain where you live, it can make a big difference. Too much water in the pile will slow down the process and can also make it slimy and icky.
Aeration
Oxygen is also required by many of the microorganisms responsible for successful composting. Give them adequate ventilation and they will take care of the rest. You can make sure that the bacteria in your compost gets sufficient air by turning the pile often and well. Use a pitch fork, spade or compost aerator to mix your pile. Don't aerate your compost and it will break down slowly, resulting in a slimy, dense, stinky pile. It's also a good idea to turn the contents since it rearranges the decaying material. With a little care, you can move the less decomposed material on the edges to the middle of the pile to heat up.
Temperature
As they eat, the organisms responsible for composting generate large amounts of heat, which raise the temperature of the pile or compost bin and speeds up decomposition. A compost pile that is working well will produce temperatures of 140-160 degrees Fahrenheit. At these temperatures almost all weed seeds and plant diseases are killed. A "very hot" compost pile will generate temperatures of up to 170 degrees Fahrenheit for up to a week or more. Use a compost thermometer to measure the exact temperature at different locations inside the pile.