Fire is a chemical reaction between oxygen in the air and some kind of fuel, like gas or wood. For a fire to take place, you have to heat up the fuel to a high-enough temperature for it to ignite (burst into flames).
For example, take wood and heat it up to a very high temperature, either with a match, friction (rubbing two pieces together), or focused light (like when you use a magnifying glass to concentrate the sun’s rays). When the wood gets to the temperature of around 300 degrees Fahrenheit (148 degrees Celsius), some of the material that it is made up of decomposes (crumbles). Then, some of this material is released as smoke, while the rest forms charcoal and ash. Ash is made up of minerals in the wood, like calcium and potassium, which don’t burn. When the gases released from the decomposing wood get to around 500 degrees Fahrenheit (260 degrees Celsius), the wood breaks apart and burns. A side effect of this chemical reaction is lots of heat, which keeps the chain reaction going. That’s why the fire keeps going, too.