Chem102 - Any real chemists, correct my 40-year-old memory. “Fire” or any similar chemical reaction - oxidation - is oxygen combining with the fuel, the flammable atoms. This could be carbon, hydrogen, magnesium, etc. When an oxygen atom hits, let’s say, a carbon atom hard enough, the two react to combine and give off heat- they are electrically attracted, and combine to fall to a lower energy state and give off their “free range” energy. A hard enough reaction - collision of molecules - strips the oxygen from it’s partner (it’s O2, after all) and ditto for whatever the carbon is bound to; different materials take more or less energy to disassemble.
And heat is basically atoms in motion, so the hotter something is, the more likely reactive collisions occur. After all, not all the molecules move at exactly the same speed in a certain temperature; it’s a statistical distribution, some faster, some slower. the faster ones cause reactions. The hotter the environment, the more molecules going fast enough to react. Now, most oxidizing reactions give off heat - the oxygen and carbon combining releases heat. If things are hot enough, and there’s enough reactants present, most of the fuel material will combine with oxygen causing a release of heat good enough to ignite the neighbouring part of the fuel material, and so on.
Fire is simply a self-sustaining chain reaction - the heat being given off by something burning is enough to ignite what’s nearby until either fuel or oxygen gives out or something (doused with water?) takes away the heat. (water also removes access to oxygen in the air; water is very stable, an open flame does not usually strip the oxygen from the hydrogen because - it’s already burned hydrogen, gave off a lot of heat when it burned, takes a lot of energy to pull it apart.)
So basically - heat material enough, it starts to react - heat paper, it chars. Heat it beyond a certain point, and it bursts into flame - enough material burns - the charcoal and the gases - to create a self-sustaining reaction.
But consider the warning - why don’t throw oily rags in a box in the garage? Oil will oxidize. At room temperate, hardly at all. An open pot of oil, the surface molecules will occasionally bond, just as other materials do. (After all, rust is just iron oxidizing in slow motion). Get a rag oily, now the surface area of the oil is immensely larger than a bucket’s surface. More oxidizing, each reaction giving off a bit of heat. Crumple these rags in a confined space, and this heat does not easily escape - instead, it raises the general temperature of the confined space.
Oops… the rags are getting warmer - what does that mean? Even more oxidation follows, the air and oil in the confined space is getting hotter, molecules move faster, more strong collisions and even more oxidation, hotter still. If the container is too well insulated, the temperature can raise enough to cause a fire, a self-sustaining reaction. (I bet there’s a youtube safety video of this process somewhere)
So the flame is just a manifestation of the high temperature. As others point out, it’s the gasses evaporating then burning. If you ever watch a strip of magnesium burn (do they allow that sort of stuff in the modern helicopter parent world?) it’s not so much a dancing flame shooting inches or feet up, as it is the surface of the metal giving off luminescent glowing gas (magnesium oxide) which stops glowing once it gets away from the burning metal surface.
Similarly, you can start a material charring or make it burst into flames by the appropriate application of concentrated sunlight, if you have lens.
So short answer - all it takes is enough heat to dissociate the fuel molecules in whatever form they take.