The behaviour of gases as they're heated and cooled can be confusing, but is really important to understanding a lot of things in daily life, from the weather outside to heating a house to designing power plants... or simply to how candles burn. Demonstration I2-45: High & Low Candles in a Cylinder gives us an example of this.
Two small candles are placed inside a closed plastic cylinder at different heights. As they burn, they release gases and particulates that are hotter than the surrounding air, so these rise to the top of the cylinder. This drives down the cooler, more oxygen-rich air, eventually smothering the flame of the upper candle.
This demonstration is also a good illustration of the two slightly different senses in which we use the term “convection,” to mean the motion of a fluid or the transfer of heat by that motion. The mechanism is the same, but here it’s the motion of the fluid (air) itself, rather than the temperature, that is the critical point in this demonstration, even while the temperature of the gas is what is driving the effect.