Since I keep my coffee in whole bean form and grind per use, I simply store any unused coffee in an airtight container. I use a mason jar for mine, that way I can see the wonderful color of the beans. I then store it in a cool spot out of sunlight, and believe me it doesn’t last me long enough to get stale. If you purchase your coffee already ground it will not keep as long as coffee kept whole bean, so be sure to keep it in an airtight container.
I do store my ground decaf in an airtight container in the freezer as I don’t brew very much decaf. The argument goes back and forth about whether to store coffee in the refrigerator/ freezer or not. My suggestion would be not to unless you drink so little that otherwise the coffee would become stale.