The answer is superheated glowing gas, mostly carbon dioxide from the burning of carbon. But that just raises another, more interesting question: why does the hot gas glow? Classical physics had an answer for this; basically they said that it's from the vibration of the molecules, each one emitting electromagnetic radiation (light) corresponding to the frequency of vibration. However, if one looked closely at the physics, it turned out there were a few problems with this theory.
It had been known for a long time that a black body (meaning a perfectly absorptive mass—like frictionless planes, these don't actually exist but are good for learning stuff) at thermal equilibrium would emit radiation in roughly this pattern:
The problem with classical physics was that the usual model there predicted that any blackbody at thermal equilibrium would emit infinite radiation at small wavelengths. This was later awesomely called the "ultraviolet catastrophe." Max Planck, working on the problem from a completely different direction, discovered that energy is quantized (meaning it only comes in discrete little squirts—this is where "quantum mechanics" comes from), and later came up with the correct answer to the catastrophe, though the derivation was rather implausible and no one took it seriously for awhile. Einstein applied this same basic idea to light, postulating that light also only comes in little squirts he called photons.
Setting aside a lot of math, this gives us the modern picture of how atoms and their electrons behave. Electrons swirl around atoms in mathematical corrals called "orbitals," and those suckers are also quantized according to strict laws. When an electron absorbs some energy, it shoots up to a higher energy orbital for a time, then relaxes back down to the original level, emitting a photon of equal energy to the difference between the orbital levels. The higher energy the situation (i.e., hotter), the larger the energy difference and the higher energy the photon. If we're talking about visible light, different energy photons means a different color, so blue flames are hotter than yellow are hotter than red.
That's it for today. Corrections, comments, and especially topic suggestions are always welcome.