If a burning candle is covered with a glass jar, it will eventually go out on its own. The amount of time it takes for the lit candle to go out varies based on the size of the jar. The larger the jar is, the longer it will take for the candle to go out.
The candle's flame is fueled by oxygen. When the jar is placed over the top of the candle, there is still oxygen for the fire to consume, but it is in a limited quantity. Once all of the oxygen contained within the jar is utilized by the flame, it no longer has its fuel and goes out.