Roasting coffee isn't as simple as heating up coffee beans until they turn brown and smell great. There's actually a lot of chemistry and physics involved. But for the sake of a short and enjoyable/informative blog post I won't drone on about thermal dynamics or carbonyl groups. Instead we'll break the roast down into three distinct phases.
The three phases are the drying phase, the maillard (pronounced mayard) phase, and finally the roast development phase. Different roasters will have different names for them and not everyone follows the same theories, so if you talk to someone and they tell you the drying phase is something else (or doesn't exist), that doesn't mean they're wrong.
The Drying Phase
The drying phase begins immediately when you drop the beans in a hot roaster. Free water (water not chemically bound) starts to evaporate as the beans absorb heat and start to equalize in temperature with the roaster environment. Water is needed for chemical reactions later in the roast, so its important not to spend too much time in this phase.
The Maillard Phase
The maillard reaction begins around 300°F and is the combination of sugars and proteins into maillard compounds. The maillard reaction is what turns bread brown when baked, or browns meat when you cook it. Maillard compunds taste woody, nutty and earthy and the sugars used to produce these compounds are ultimately subtracted from the sweetness of the coffee. Therefore, just as in the drying phase, we don't want to linger too long here.
The Roast Development Phase
During this final phase, which starts with a bang (literally, with first crack), sugars are carmelized and acids are reduced. Chlorogenic acids, which have a very bitter taste – think of a mouth full of chlorinated pool water – are reduced during this phase. For lighter roasts, these acids are part of what gives the coffee its acidic flavors; flavors like green apple, orange or lemon. During this phase, the key word is balance. We want to reduce those acids but not over-carmelize the sugars, because carmelized sugar is not necessarily sweet. It has a carbony, smokey note that detracts from the sweetnes.
You'll notice I focus a lot on sweetness. Coffee is intrinsically bitter so I like to compliment that bitterness with sweetness as much as possible and doing that makes a great cup of coffee!