Ships do not carry enough water to sustain all of the ship's requirements until they reach port. Ships distill their fresh water from seawater.
The process is called flash distilling. Seawater is heated to nearly boiling temperatures and pumped into a distillation chamber. The chamber is at a lower pressure than atmospheric pressure. Water boils at a lower temperature when atmospheric pressure is reduced; some of the heated seawater flashes to steam, that steam is collected and condensed into fresh water. The remaining water is pumped to a second distillation chamber, which is of a lower pressure, and more of the water flashes to steam. The water is then pumped to a third and final chamber and the process is repeated. The remaining water, or brine, is now far more salty than seawater; it is pumped back into the sea. The heat of the brine is not wasted. It flows through a heat exchanger to help heat the incoming water.
Once an evaporator was operating, it would not be shut down until the plant was shut down. A typical small steam-powered combatant would make 12,000 gallons of fresh water per evaporator (two evaps per plant). The rule of thumb was that 12,000 gallons per day went to the engineering plant as feed water to make up for steam leaks and for use in steam atomization of the boiler fuel. The other 12,000 gallons per day was supposed to be potable water which was used for "hotel use": Cooking, cleaning, dishwashing, showers, drinking water, bug juice and, of course, coffee.
As each potable water tank was ready to be used, the ship's corpsman had to test the water in the tank. Seawater in a port or near land was considered to be contaminated by sewage and fecal matter. It could be used, in theory, but heavy doses of bad-tasting chemicals were required to ensure the water was healthy. In practice, to avoid having to heavily treat potable water made from contaminated seawater, fresh water from the evaporators was not "cut into" the potable water tanks until the ship was well out to sea. If a ship was anchored out, a freshwater barge would resupply the ship each day.
Each day, as part of the Twelve O' Clock Reports to the Captain, the Engineering Report listed the amount of fresh waster and feed water on hand, both in gallonage and percentage (and also gave the statistics on fuel used, received and on hand). If the percentage of fresh water was too low, then "water hours" would be initiated. The newer and smaller steam ships made more water than they could use; the potable water and feed water tanks were generally topped off by 0200 each day and the evaporators' output would be piped back into the sea until the work day started.
Older ships were perennially on the edge of having to ration water. Engineering plants developed leaks as they aged and even the most energetic maintenance program could not keep a large steam plant in "as new" condition. Over time, sensors and weapons were added to every ship, which resulted in ever-larger crews. A ship unlucky enough to carry a destroyer squadron staff or a flag staff had even more people using fresh water.
I knew of one cruiser captain who decided to make Sunday a working day at sea. When the XO told the department heads, the Chief Engineer quickly collected a few weeks' worth of water reports, which showed that the ship began each Monday with 100% fresh water and began each Sunday with 60% fresh water; the fact that nobody was using water to do heavy cleaning or maintenance on any given Sunday allowed the ship to refill the potable water tanks. As the Cheng explained to the Captain, if Sunday was a working day, by the following Friday, the ship would be on water hours and it would take several days to recover.
The Captain canceled his plans to work the crew that Sunday.
The LAMPS equipped ships were hardest hit, as the LAMPS detachments had thirty people in them. Those ships were designed to operate drones with a much smaller maintenance team. The helicopter itself required frequent showers of fresh water for corrosion control. Chief Engineers were known to regard the LAMPS detachments as water-sucking vermin.
1 minute ago