You would think that a steam ship in the sea is ideal wouldn't you, plenty of water to use in the boiler.I fact this is not the case, salt water and boilers do not mix. Because of corrosion and other considerations fresh water has to be used in the boiler.
This is where the condenser comes in. The condenser takes the steam that has been used in the engine and condenses it back into water and then it is pumped back into the boiler. As a bonus the condensing steam causes a partial vacuum and has the effect of increasing the power from the main engine.
The system is so finely calculated that the amount of steam that is condensed from the engine is exactly the same as the amount of steam that the boiler lost so the closed system is complete and in theory should never need topping up. However in practice there are inevitable leaks in valves etc so topping up the boiler from the four fresh water tanks is required from time to time.