Roasting is where coffee's flavor is fulfilled. The green coffee beans are heated in large, rotating drums using temperatures of about 550 F (288 C). The tumbling motion of the drums keeps the beans from burning.
The beans first turn a yellowish color and smell a little like popcorn. After about 8 minutes, the beans "pop" and double in size. The beans have then reached about 400 F (204 C) and begin to brown as the oils within them start to emerge. This oil is called coffee essence or caffeol. The chemical reaction of the heat and coffee essence is called pyrolysis, and is what produces the flavor and aroma of coffee. A second "pop" occurs about three to five minutes later and signals that the bean is fully roasted.
Coffee roasting is something of an art. Roastmasters use sound, sight and smell to determine when the beans are roasted to perfection. Timing is everything. Roasting time affects the color and flavor of the final brew, so the length of the roasting period depends on the type of coffee desired (shorter for American brew, longer for espresso).