When most small boats are at a dock, they typically make an electrical connection to shore power, obtaining 120-VAC from the marina or dock facility. Some larger boats may connect to 240-VAC shore power. Big boats typically can't access electricity that would be needed and so run their own power generation plants when connected to a dock during loading or unloading for a day or two. They just continue to run on electrical power they generate themselves, running their often dirty, diesel engines in port. These emissions are historically not well regulated by local emissions laws as they are considered an itinerant emitter.
The North Star is one of the first of this new breed of "plugable" cargo ships which can plug into special sockets when in port and so depower the entirety of its onboard generators.
There is an interesting episode airing on the Smithsonian Channel’s Mighty Ships series about this ship, but I can't find a full episode. I only was able to find a few snippets (like this one), none of which show the electrical coupling aspects. If you can find it, only the first 10 minutes are worth the watch (the rest is a typcial fake reality drama when no drama actually exists thing).
The Port of Los Angeles/Long Beach is moving full bore with adopting such requirements for long haul freighters/terminals amongst a host of approaches to minimize emissions (known as the Clean Air Action Plan) generally. Lastly you might be interested in both a nice example of a Life Cycle Analysis for the goings on at the Port of Los Angeles and a guide for how entities can improve their emissions.