In science today we did an experiment about complete combustion. To do this we filled a plate with water (and added red food colouring), placed a candle in the water, lit the candle and put a beaker over top. The resulting reaction led to the water rising inside the beaker and once the candle was starved of oxygen and burnt out, the water stopped.
Video:
The way this works is without an outside source of oxygen, the flame uses it all and eventually runs out, thus making more space and allowing the water in.