Most of the water that a cruise ship uses is is desalinated sea water that they get while on the cruise through pumps.
The water goes through a desalinating process to remove the salt and sanitize the water that makes it safe to drink.
The sea water then goes through a process that involves steam evaporation essentially turning saltwater into distilled water that is safe to drink.
The water also is then mineralized for flavor and chlorinated for extra safety.
Some cruise ships may get some of their water from public sources when they are docked at the port and then a tank is filled just like a fresh water tank on an RV but in a larger tank.