Fire is the visible result of the chemical reaction called combustion. Fire is a great example of a chemical reaction that involves the movement of electrons from one substance to another, a process called oxidation. In order to continue burning, fire needs both oxygen (O) and a fuel source (such as wood), and it results in the creation of many new products, including carbon dioxide (CO2) and water (H2O). Fire emits great amounts of heat and light, and while it has many uses, fire can easily spread, becoming extremely dangerous.
Candles are actually pretty clever, so props to the ancient human that invented them. If we tried to light only a piece of string on fire, it would probably burn up pretty quickly—and trying to ignite a plain piece of wax isn't much better. When we light a candle, we light the exposed wick, which gives the wax surrounding it just enough time to melt and turn into a gas—a very flammable gas! This process will keep melting and burning the vaporized wax until it's all gone or someone blows it out.
Oxygen, the same gas we breathe, is a critical component to combustion reactions. Remove it, and fires can't burn! Most fire extinguishers work by unleashing a chemical reaction that produces lots of Carbon Dioxide (CO2), which replaces most of the oxygen around an open flame. Curious to see this in action? Check out the Pourable Fire Extinguisher science experiment.
The color of a fire changes based on how much oxygen (O) is available: blue for higher oxygen levels and yellow when there is less oxygen.