title_body: What affects coffee quality?
upvoted_answer: This is a fairly general question, so pardon me for a slightly generic answer.
  
  First thing you'll want to consider is the quality of the coffee itself.  Typically, the more expensive a coffee is, the higher quality it will be.  It's the age old phrase, 'You get what you pay for".
  
  Secondly, the less steps from it being picked to it being in your cup, the better.  Packaged, ground coffee has more steps (Packaging, grinding) before being brewed.  Whole bean coffee has less.
  
  Third, the longer it's been ground, the longer it has had to degrade.  You'll want to grind your whole-bean coffee as close to the time of brew as possible.  Oxygen will erode the flavor of the coffee over time.  Ground coffee has more surface area to be exposed to oxygen.
  
  I hope this addresses what you were asking properly.