The burning candle produces carbon dioxide and water in the form of water vapor. The glass becomes foggy due to this water. The flame goes out, of course, from a lack of enough oxygen in the glass. ... The air is heated while the glass moves downward