A coffee roasters job is much more complex than simply dropping some beans into the roaster for a period of time and then “voila" they are done.
Roasters have a few tools to manipulate the roast, such as heat, air flow and of course time. Depending on their goal for the coffee they must modify the profile. They also have many other factors to take into consideration, for example how the coffee was processed, the size of the coffee beans, batch size and moisture content. Coffees all roast differently.
Roaster heat starts high and is gradually lowered until the end of the roast. Airflow can remain steady or may be increased as the roast progresses. The air flow removes the chaff from the beans and is also used as a way to manipulate the heat (higher or lower).
Coffee goes through different phases or stages as it is roasted. The first phase is typically called the "drying phase" where the heat is drying out the green bean. Basically removing moisture from about 11% down to 1%. The bean is turning from green to yellow. The coffee will change from a smell similar to wet grass to something resembling more like hay.
Then we enter the “Maillard or browning phase", when the browning starts to occur. This stage is said to help build the body and sweetness of the coffee. The coffee will start to smell more like bread baking. In the last few seconds before first crack happens the coffee start to smell sweet and resemble what the coffees flavours could be.
Up until this moment the coffee has been taking in heat (endothermic) until it cant take it anymore. Then we have first crack which is when the coffee cracks (exothermic reaction, the coffee pops like popcorn) and releases energy, this stage, typically called the “development phase" is critical in controlling and has a large impart on how the coffee will taste. If the roaster ends the roast too soon it could be under developed, giving the coffee a vegetal flavour. Contrarily, if the roaster keeps roasting this coffee too long it will become dark and bitter.
Depending on the style of the roast the roaster is looking for, depends on how they will manipulate these stages. The longer the coffee is in this final stage the lower the acidity will be and less of the terroir of the coffee will shine through. Typically, espresso roasts are roasted a little longer to bring down the acidity.
This is a summary, but there are many other factors a roaster must facilitate.
Here we see an example of what a roast profile could look like: