If you grind it yourself, it is wise to invest in a good “burr” coffee grinder. The less expensive “blade” grinders essentially chop the coffee bean instead of crushing it and it is difficult to grind the beans to proper coarseness. Blade grinders also create excessive heat, which destroys the volatile oils and reduces the quality of the coffee.
In contrast, a good “burr” grinder will consistently grind your beans to a desired level of coarseness, create a much more consistent grind, and they generate less heat. If you use an espresso machine, make sure the burr grinder can grind the bean fine enough for espresso.