A flame needs oxygen to burn, so when you have a lit candle, it uses up the oxygen right near the flame. Luckily, that air is getting heated by the flame, so it rises, and new air comes from below and from the sides to replace it with fresh oxygen.
site note: this is why a candle won’t burn very long on the international space station. Since hot air doesn’t rise in microgravity, the air around the flame will lose its oxygen and new air won’t rush in to replace it.
Latest Answers