Step 1: The Tools
In either case you want to get some fresh, whole beans and grind them yourself. A decent grinder is only about twenty bucks. They tend to give you an uneven grind, but the only way to insure a perfect grind is investing in a high-class "burr" style grinder. I love coffee, but not enough to drop a hundred on a grinder.
Most stores sell beans. The absolute best place, however, is going to be a coffee shop that roasts their own. Once the bean is roasted, it can start going stale. The whole bean will keep for a while, but once ground you best be brewing quickly or you won't really tell the difference.
I stick with a mild Kona blend of coffee, making sure it actually contains beans grown in Hawaii. Your tastes may differ. On a budget, I will get Dunkin Donuts beans which are surprisingly good.
Step 2: Grindin'
Grind for about ten seconds. You want a bit of a coarser grind if using a french press and a finer grind for drip coffee.
If you use less than this, your coffee has a greater chance of turning out quite bitter. The science behind this is somewhere on the Internet. Trust me.