Freshwater is generally produced onboard using the evaporation method. There are two things that are available in plenty on the ship to produce freshwater –Seawater and heat.
Thus freshwater is produced by evaporating seawater using heat from any of the heat sources. The evaporated seawater is then again cooled by the seawater and the cycle repeats.
Generally, the heat source available is taken from the main engine jacket water, which is used for cooling the main engine components such as the cylinder head, liner, etc.
The temperature available from this jacket water is about 70 deg. centigrade. But at this temperature, the evaporation of water is not possible as we all know that the evaporation of water takes place at 100 deg centigrade under atmospheric pressure.
However, the boiling point of water can be reduced by reducing the pressure of the atmosphere surrounding it. By maintaining a low pressure, water can be boiled at low temperatures say 50 degrees Celsius.