Buy quality whole beans from a reliable purveyor (preferably a roaster). If you don't have a grinder at home, ask a salesperson to grind whole beans for you rather than settling for pre-ground.
Purchasing bulk (unpackaged) beans from a specialty shop is okay as long as the bins or jars are relatively small and refilled regularly. Large vats hold a lot of beans and therefore don't need frequent filling. That means that beans can hang around for a long time being exposed to light and air. That can mean stale beans, and staleness is not a desirable attribute.
Purchase pre-packaged whole beans only when sealed in a foil-style bag featuring a one-way valve. The dime-shaped plastic valve is usually integrated into the packaging so that it will be as unobtrusive as possible, so check carefully. The absence of a valve means that the coffee probably sat and "gassed out" before it was packaged. That means it could be stale. Stale, again, is not a good thing. And remember: paper bags with twist tops are temporary transportation vessels, not storage devices.
Try to purchase only a week's worth of beans at a time. If you live where this is impractical, purchase several small sealed packages rather than one large one. Unopened one-way valve bags will keep coffee fresh for approximately three months. If you buy bulk coffee (not sealed with one-way valves) in large amounts, divide into weekly batches, seal in Mason-style jars and freeze. Transfer these small batches to counter top storage as needed (see below) .
Store opened or bulk coffee in an airtight, opaque container and store at room temperature for up to a week.
Grind coffee as close to brewing time as possible. For drip method, grind in blade style grinder for 15 to 20 seconds. For French presses, grind for only 10 to 12 seconds.
Regardless of method, brew using 2 heaping tablespoons of coffee for each 6 ounces of clean (filtered or bottled), cool water. If you prefer a milder cup, brew to full strength, and then dilute with hot water. Brewing with too little coffee will result in over-extraction, and that means bitterness.
If you really want to taste the subtle nuances of regional coffees, consider a gold mesh filter.
When purchasing a coffee maker (either manual or electric), look for a model that brews into a thermal carafe rather than a glass pot designed to sit on a heating element. Continuous heating of coffee leads to bitterness.
Quality decaffeinated coffees usually cost more than regular beans.
Guidelines courtesy of Alton Brown