Coffee does not expire in the sense that it becomes unhealthy to consume. However, the quality does lessen over time. Unopened coffee will stay fresh for up to a year, while opened containers are good for only a couple weeks.
Storing coffee in an airtight container is essential to ensuring it stays fresh for use long after a person first opens it. Additionally, it is essential that the container be stored in a cool, dark place. Failure to do so can lead to poor tasting coffee when it is finally brewed. It is also important to note that ground coffee loses its freshness much faster than whole beans, due to the difference in surface area exposed to the open air.