The art and science of composting, as with all things in life, has some fixed requirements and some flexible elements. To make the microbial science work, composting requires roughly even inputs of green organic material and brown organic materials. Coffee grounds have a neutral pH and are rich in nitrogen making them an ideal third input material type for the compost pile.
Start a compost pile including coffee grounds by layering one-third of nitrogen rich green clippings, one-third carbon rich brown material such as leaves or straw and one-third in moist coffee grounds.
Add used coffee grounds to a pre-existing and active compost pile by sprinkling them onto the pile along with an equal amount in volume of carbon rich organic material, such as dried leaves, to maintain the optimal nitrogen-carbon balance.
Turn the compost pile with coffee grounds once per week moving the top and side material into the center and the center material up and out. Starting from scratch a batch of coffee ground compost will be decomposed and ready for garden use in three to six months time.