Storing your coffee in the right conditions is very important to help prevent the coffee going stale and losing its flavours and aromas. Firstly you should always try to store coffee in an airtight bag or container. This will help stop the oxygen staling the beans. Secondly you want to make sure you keep your coffee in a dark cool place. Light rapidly increases the staling of coffee, especially sun and UV light.
It is not a good idea to put coffee in the refrigerator as you can end up with cross contamination of aromas from other items in the fridge. You don’t want an onion flavoured coffee. Also refrigeration can affect the moisture content within a bean which can have an impact upon flavour.
Finally make sure you keep your coffee dry. You want to avoid humid or moist places as again this will increase the staling speed of the coffee. If possible try and keep your coffee stored in the full bean form and only grind when you need it. Once you grind coffee it will go stale a lot more quick as more of it is exposed to moisture, light and oxygen.