A diagram showing a rough schematic of processes in the thermal degradation of organic matter (carbon-based material that was generally once part of a living thing). At low temperature, volatiles, mostly water, evaporate; some chemical changes occur below boiling point, but many organic compounds are stable until all the water has boiled off and the temperature rises above the boiling point. At sufficiently high temperatures, the organic molecules thermally degrade, releasing altered organic molecules and more volatiles, which leave as smoke. Generally, this process also absorbs energy. Carbon is left behind, and the material becomes black and charred. As temperatures rise further, pyrolysis continues, but oxidation with atmospheric oxygen also becomes possible. Carbon can now combine with oxygen, a highly exothermic reaction. The released heat allows more carbon to combine with oxygen, and the reaction can more easily become self-sustaining. Most organic matter contains a few percent nitrogen, which can oxidize as nitrogen oxides, NO2 and NO3. Finally, the material is reduced to a whitish ash, which has only a fraction of the volume and weight of the original organic material, as the water, carbon, and minor constituents have largely left in the smoke, as gas, droplets, and particulate matter.
In an actual fire, these processes are generally all going on simultaneously, with the center of the fire hotter and the outside cooler, and lots of small-scale variations.
An exception is the production of charcoal, called charcoal burning. It partly burns wood at a low temperature, releasing most of the volatiles, pyrolyzing it, but without oxidizing most of the carbon. The wood is carbonized right through. The resulting charcoal is black, lightweight (mostly because the water has left) and much cleaner-burning, as much of the pyrolysis products have already been released, and oxidizing the carbon produces only CO2 (and CO, if there is a lack of oxygen). Some cities ban, or used to ban, wood fires; when residents only use charcoal (and similarly-treated rock coal, called coke) air pollution is significantly reduced. In cities where people do not generally cook or heat with fires, this is not needed.
Charcoal can be made of most organic material; husks, leaves, grass, briquettes of compressed sawdust, and so on.
Bread is baked at temperatures above boiling, but not for long enough to drive off the water (except partly, in a thin crust on the outside, which therefore browns). If the bread is baked slowly at lower temperatures, it will be paler; if it is baked too long, it will char and blacken from the outside in. If a slice of bread is toasted, the face will first brown, and then blacken; in slightly burnt toast, the thin layer of char can be scraped off.
Note that denaturation can occur at temperatures below boiling, and is responsible for a lot of low-temperature cooking reactions (like dough turning into bread, or meat becoming firm, or eggs solid).
In a boiling pot, water near the bottom surface is vapourized and the water vapour bubbles to the top. If the food in the pot is too thick, new liquid water cannot reach the bottom of the pot to cool it. Unless the pot is stirred soon, all the water in the bottom layer boils off. The layer of food nearest the bottom of the pot dries out, its temperature rises above the boiling point, and it chars. The food burns to the bottom of the pot.
Frying oil can easily rise above boiling point, and food left in it for long enough to dry out can char (for instance, caramelized onions). Putting a lid on the frying pan keeps the water in, and some of it re-condenses, keeping the temperature lower for longer. 
In a chip pan fire, the oil is heated too much, and it auto-ignites, with the carbon in the oil oxidizing. If water is poured into the pan, it will sink to the bottom, because oil is less dense than water and thus floats. Both the bottom of the pan and the oil are far above boiling point, meaning that the water will heat and flash to steam, erupting from the pan and pushing the flaming oil out ahead of itself. The oil, suddenly spread out and exposed to air, will all ignite at once, making a large fireball. Such fires often cause injury and death.

In an oil lamp, a small amount of oil is wicked into a strip of absorbant material, and the end of the strip set alight at some distance from the main pool of oil. The oil reservoir remains too cool to burn.
Own work
HLHJ