Whole coffee beans maintain their freshness much longer than ground coffee, so making a small investment in a coffee grinder is a simple way to greatly improve the quality of your coffee. If grinding your coffee fresh each morning is a great leap forward, grinding with precision and understanding takes you forward a few more steps.
There are two factors to consider when grinding coffee: the fineness of the grind (on a scale from coarse granules to fine powder) and the consistency of the grind. It is advisable to match the fineness of the grind to the brewing method that you will be using. Furthermore, the better your grinder is able to grind a batch of beans to a consistent fineness the more you'll be able to control the quality of your cup of coffee.
Brewing coffee is all about extracting the best qualities of the coffee bean into your cup. Over-extraction and under-extraction should be of equal concern to the brewer. Under-extracted coffee will be weak in flavor and body. Over-extracted coffee can be unpalatably bitter. Ideal extraction relates both to fineness of grind and length of extraction. Of course, finding the extraction sweet-spot can be subjective and personal.
In general, the idea is to use a finer grind for brewing methods that have faster extraction times. An espresso machine, for example, forces hot water through the coffee grounds at high pressure and high speed. The extraction period is very short and so it is best to use extra finely ground coffee. On the other hand, when using a press pot (french press), one should let the coffee steep for a for four minutes; this long extraction time lends itself to a coarse grind.
Here is a commonly accepted list matching grind level to brewing method:
Coarse grind: Press pots, percolators
Medium grind: Drip pots with flat-bottom filters
Medium/fine grind: Drip pots with cone-bottom filters
Fine grind: Stove-top (Italian) espresso pots, also known as “Moka Pots”
Extra fine grind: Espresso machines
Grinding your coffee accurately and consistently is really only possible with expensive grinders. Most people, however, will be satisfied with the results from an inexpensive grinder. Again, it's all subjective.
There are two primary styles of grinders: blade and burr. Blade grinders are the ubiquitous $15 cylinders that use rotating blades to “cut” the coffee. With these it is difficult to get a consistent grind. I find that they work well for achieving a medium grind for drip pot coffee makers, but it is difficult to get a consistent course grind and impossible to get a truly extra fine grind. When operating a blade grinder it is helpful to not overfill it and to physically rotate the apparatus during the grind in order to help circulate all of the beans into the blades path. I would grind for a few seconds in this manner, then give the shake the grinder to further mix the beans, then grind again.
Burr grinders literally grind the beans between two burrs, which can be adjusted by the turn of a knob to create a coarser or finer grind. Burr grinders start at around $35 for cheap models with better ones costing up to $200 or more. In general, I think you probably get what you pay for. I've owned two different burr grinders, both purchased in the $50-$60 range from Carl's Cuisine on Chemeketa St.
I used the Capresso 580 grinder for about three and a half years until I realized that it was no longer able to grind fine enough for even a press pot. Apparently the burrs wear down over time. Recently I bought the Krups GVX2 and have noticed an improvement in my coffee quality since retiring the out-of-shape Capresso grinder. So far I would recommend the Krups grinder over the Capresso, as it is smaller and cleaner (the Capresso tends to get excess grounds caught in various places). On the down side, it is much louder than the Capresso.
There are also various hand powered grinders, which typically use ceramic burrs to grind the coffee. I've never used one of these but if you are the type who brings your french press on camping trips, you can already see the value in it. I bought one for my brother a couple months ago and he reports that it works great and can adjust easily to different grind levels but it takes a substantial amount of work to grind all the coffee you need and is too cumbersome for daily use.
All this talk of modern grinding choices probably has you wondering how the earliest coffee imbibers ground their coffee long ago. I don't have the answer but can only guess that it involved rocks, which brings me to the final grinding method: the Caveman Crush. My friend Rob invented (or re-invented) it a few months ago when we found ourselves stuck at a cabin with lots of fresh-roasted coffee beans but no grinder; one day you too may find yourself in this situation and you'll be grateful for the following instructions. You will need a smooth stone big enough to fill up your hand but small enough for a firm grip, a towel or cloth, and a bowl. Head outside, pour the coffee beans into the towel and secure the towel around them. Pound the towel with the stone until you have achieved a consistent grind appropriate for your brewing method. Pour the grounds into a bowl and go from there!
Honestly, I was shocked at how good of a grind Rob achieved with this method and it was definitely the most fun I've ever had grinding coffee. Pictures below.