Fire is created through quantum reactions with the air. The air excites the molecules and they emit photons, which are what we see when we look at flames.
Fire has been used for around 1 million years for cooking food in a controlled manner and for lighting. Candle flames burn at about 1000 degrees Celsius but the color of the flame depends on the substance being burned. Calcium provides a red flame; sodium delivers a yellow flame and barium gives a greenish flame.
Fire requires heat, oxygen and and fuel to burn. Though wildfires can be quite dangerous in many circumstances, controlled burning is used for burning down brush in forests to stimulate ecological growth.