This is something that I never gave much thought to until I started trying to "live green". Then I decided that I needed to give it a try, for many reasons. One, I was trying to cut down on the amount of garbage that my family produced. I figured that if I could recycle some of it and compost some of it, my actual garbage production would go way down (and I was right). Two, we were spending money on fertilizer and "good dirt" for our garden and plants. Why spend money when we could make it ourselves?
You can go as simple or as elaborate as you choose. You can have a bin in your yard (homemade or purchased) or you can have an indoor bin filled with worms who will compost for you. Either way, your ultimate goal is to create finished compost. Which is defined as a pile of organic material that is so decomposed that it has transformed into something beyond "rotted" stuff and into something useful.
Hot composting is when you get a bit more involved. With this, you will be able to keep the pile neat and decent smelling and in the end you will have a finished product.
If you choose an outdoor compost you have the choice of purchasing a ready made bin that usually has a built in feature to make it easy to turn your compost. They are also usually compact and more attractive than an actual "pile". Or you can build your own pile. There are directions all of the Internet for different ways to build your own pile. Some of them get pretty creative. A quick google search will bring up pages of links.I would recommend putting it a few feet from the house, just in case of smell or rodents. Regardless of what you use to build the sides of the bin, you will need to have it well ventilated. This means, keep it a few feet away from fences, trees, etc.
I would also recommend putting it in reach of a hose, unless you do not mind carrying water in a bucket when needed. If you live in a hot area, I would put it in the shade so that it doesn't bake into a hard pile that takes years to decompose. If you live in a really wet area, I would recommend covering the pile. If it gets too wet it will smell bad and will not get enough air to properly compost.
For the pile to be able to reach the temperatures it needs while still allowing the center to breathe, the bin should be between three and five feet cubed (that is, three to five feet wide, long, and tall).
As for what to add and how, the most common ration I have found is a 30-to-1 ratio of "browns" to "greens". Greens are made up of fresh plant matter or animal by-products. They provide the nitrogen, protein, and some moisture to get things going. Browns are made up of dry or dead plant materials. They add carbon and bulk so that the composting microbes can breathe.
If you don't want to get so technical, just follow the general rule of adding more dry bulky stuff than fresh or green dense stuff. To put it simple, if it's fresh, it's a green; if it's dead and brown, it's a brown.
Greens: grass and plant clippings, waste from your garden (plants that were left too long and got too large, etc.), coffee grounds, eggshells, tea bags, vegetable peelings and scraps, leftovers from dinner, fresh manure (chicken and cow), human hair, milk
Browns: Wood, sticks, sawdust, dead leaves, dry straw, shredded newspaper, dead plants, rice, pine needles.
As you add materials, make sure to spray it down with the hose every few inches. It needs to be moist but not wet.
It can take anywhere from six weeks to two years to produce healthy compost, depending on the materials you use and how much attention you give your pile.
What is happening, unseen, is that the center of the pile is heating up. The microbes, who are eating away, are the cause of the heat. You will need to turn your pile (which means that you will mix it up so that the outside is worked into the inside and everything gets a chance to compost. You can use a shovel to do this. You will notice that as time goes by, your pile will shrink. It should also smell "Earthy" and look like dark soil. This is how you will know that it is ready to be used as fertilizer.
You can also compost indoors, on a smaller scale, by using worms. Here is a link that explains more about that. I do not have any personal experience in this area so I will let the link explain more.
As a side note, my journey down the road of having our septic system pumped led me to do some research on composting human waste. I won't go into that here but for those interested, this is an excellent online book on the subject.