There are four principal ingredients to any compost pile: oxygen, water, carbon, and nitrogen. Oxygen and water are readily available by simply aerating the compost and ensuring it stays damp, but having a high level of nitrogen-rich material is crucial. These nitrogen-rich materials are commonly known as composting "greens," and they can come from several sources that are not all green in color.
Yard Compost Greens
A general rule to follow is that anything can be a composting green if it is moist and fleshy as opposed to dry and woody. Fresh grass clippings work, though they must be put on a compost pile immediately---if they are allowed to dry beforehand, they will pull much of the moisture from the compost pile and impede the decay process. Flower heads of any kind are appropriate. Weeds will work, but any seeds must be removed beforehand to prevent them from sprouting in the compost and transferring to your garden. Chicken and turkey manure is particularly high in nitrogen, making it ideal if you can stand the strong smell. Horse manure is a more manageable alternative.
House Scrap Greens
Eggshells, used coffee grounds, and tea bags can be used for composting greens. Teabags and coffee filters are biodegradable, but sometimes the tea can contain chemical preservatives that have adverse effects on compost, meaning you should check before using them. Discarded fruits and vegetables, fresh or rotten, are perfect. Also, the droppings of any rodent pets you might keep such as gerbils, hamsters, rats, and mice are all quite safe for composting greens. The wood chips and bedding from such pets also works.
Bad Compost Greens
There are some greens that are dangerous to put on compost piles.
Raw cow manure, though plentiful and often cheap to obtain, has high levels of E. Coli bacteria. Well-composted cow manure is better, but obviously does not need further composting. Placing raw cow manure in your compost would promote the reproduction of the bacteria, creating a serious health hazard. The same goes for human fecal matter. Cat, dog, reptile, and wild animal fecal matter should be avoided because it may contain both bacterial pathogens and parasites.
Plants, flowers, and weeds that suffer from obvious bacterial or viral infections, typically discernable by the presence of odd discoloration, spots, or blisters, should never be included on compost piles for fear of propagating the diseases and spreading them to your garden.
Meat and dairy products also should be kept out of the compost heap, as they will putrefy an create offensive odors and attracting unwanted pests.