There are several things you can look for when you are buying a bag of coffee, and it can be even more helpful when you get to talk to the coffee roaster selling the bag themselves! The baristas should provide you with the info you need.
There are several things you can look for that should be on the bag:
1. The roast date - Coffee stays at its freshest for 1-4 weeks. That does not mean that you should toss out the coffee if you buy it and you have had it longer than this time! However, if you are buying a brand new bag, you should try to buy something that was roasted within 2 weeks of your purchase.
2. The coffee species - Arabica is generally perceived as being higher quality than Robusta. Therefore, you should try to buy Arabica beans. If the bag does not say whether it's Arabica or Robusta, it may also say the coffee variety, like Yellow Caturra or Bourbon. You can look up the variety online and see whether it is a type of Arabica or Robusta variety.
3. Sustainable coffee - Is the coffee organic? Fair trade? Purchased directly from the producers? A lot of coffee bags will make a point to say whether or not they are treating others fairly in the coffee business, and if there is nothing about this on the bag, it may be worth it to find a coffee roaster who is trying to sustain the coffee industry as a whole by doing this.
4. Whole bean or ground - Whole bean versus ground is another indicator of how fresh the coffee will be. Buying whole bean will ensure that you can grind the coffee for freshness, whereas pre-ground coffee may taste stale very soon. As soon as you grind coffee, it oxidizes and will lose freshness if ground too soon. If you do not have a grinder, you can also buy whole bean and ask a coffee bar to grind it for you, or some grocery stores have their own grinders. This way, at least YOU will know how long ago it was ground.
5. Roast type - There is generally light, medium, and dark roast when it comes to coffee roast profiles. I highly recommend medium roast coffee, as it is the perfect balance of bringing out the sweetness and aromas of coffee beans. Too light and it may be underdeveloped, too dark and it may taste burnt and oily. Everyone has their own personal preferences on this, but most specialty coffee prefers medium roast for this reason.
I know this is a lot to consume, but I hope that it is a good start for your coffee-buying journey. Cheers!