Pyrolysis is the chemical decomposition of a condensed substance by heating. It is a special case of thermolysis, and is most commonly used for organic materials. At lighter levels, caramelization of sugars is an important result of the pyrolysis of coffee, the release of CO-2, and a host of other chemical and physical changes in the coffee. There are two stages of pyrolysis in coffee which we call "First Crack" and "Second Crack." Extreme pyrolysis, which leaves only carbon as the residue, is called carbonization and leads to charred flavors in very dark coffee roasts.
Pyrolysis often occurs spontaneously at high temperatures, for example in fires and when organic materials come into contact with lava in volcanic eruptions, and has been assumed to take place during catagenesis, the conversion of buried organic matter to fossil fuels. It is an important chemical process in several cooking procedures such as baking, frying, grilling, and caramelizing. It's important to note that chiefly involves the conversion of carbohydrates (including sugars, starch, and fiber) and proteins.