Visible flames are hot gases emitting light, which naturally rises because it is hotter (and therefore less dense) than the air around it. These hot gases are byproducts of the chemical reaction of combustion, or burning.
The combustion process requires three things: fuel, heat, and oxygen. Often in everyday situations the fuel is wood. When wood is heated to its "ignition temperature" (300 degrees Fahrenheit) some of the cellulose, the primary material that composes the wood, begins to break down. The decomposed material from the wood consists of ash, non-combustible material left over, and char, pure carbon. The fire also releases hot gases which rise as smoke.
When the gases (or smoke) are hot enough (around 500 degree Fahrenheit) their compound molecules break apart and react with oxygen to form water vapor and carbon dioxide, as well as carbon monoxide, particles of pure carbon and nitrogen. This recombination is the chemical process known as combustion. All of these chemical reactions produce a large amount of heat, and as the rising particles heat up, they emit light.