Chris Owen from ChrisCruises:

Historically, there was no way to convert the 50 Hz utility power offered on the shores of some countries the 60 Hz usable by cruise ships.  The Cochran Marine Shore Power System converts the standard voltage of any cruise terminal worldwide to match that of the vessel. Sort of like a plug adapter that one might use to plug in U.S. devices in the U.K.

Through a process, it seamlessly transfers electrical power to the ship while it is docked.  By connecting to shore power, cruise ship operators can turn off diesel engines and run entirely on electrical power while in port, which reduces carbon emissions by approximately 87 tons per call.

 

But that still doesn’t fix the main problem of where is that electricity coming from in the first place. The powerplant that generated the shoreside power could be burning coal which would pollute just as much as the ship burining fuel oil.