What is the function of a dearator on a steam boiler

Deaerator removes dissolved oxygen from boiler water.

The condensate cascades down a number of perforated trays and its surface area is greately increased. This enables dissolved oxygen to come out.
Further bleed steam is supplied to deaerator and due to this the atmosphere is predominantly of steam. So the partial pressure of oxygen above the water level is very very low. When a gas exists above a liquid level, the solubility gas in the liquid depend upon its partial pressure. So oxygen comes out of water.
Deaerator outlet water has less than 0.05 ppm dissolved oxygen.