Wat hapens when a burning candle placed in a plate filled with water,is covered by a glass,?

water level rises within the glass,and candle stops burning, Why???