Principle
Air is a gas mixture consisting mainly of nitrogen, oxygen and carbon dioxide. In the course of respiration, oxygen is consumed and carbon dioxide is formed. The volume fraction of oxygen in exhaled air is therefore smaller than in inhaled air.
Similarly, combustion (e.g. a candle flame) requires oxygen, which is used in this experiment as an "indicator" of oxygen concentration. Different concentrations of oxygen in the air lead to different burning times of a (candle) flame. Exhaled air has a lower concentration, therefore the burning time of a candle flame in exhaled air is shorter than in "normal" air.