To answer your follow-up question, your friend is definitely wrong if he meant that the ship is not subject to the local laws and somehow allowed to go everywhere and disembark passengers without visa in each and every country of the world, just because they are not staying for the night. As far as I know, the only situation in which international law would mandate something like that is if the ship is in distress.
That said, many countries welcome international cruises and might provide ways to go on-shore without visa or facilitate the visa process because they are happy to get a boatload of tourists to spend their money. But that's still entirely up to them, it has nothing to do with the ship being some sort of “international accommodation”.
Similarly some countries have generous visa waiver provisions or offer exemptions from visa or even passport requirements for organized tours as a way to foster tourism (e.g. Tunisia, where some foreign nationals can go with ID but no travel document if they are part of a group), even though there is no ship and no international anything in this scenario.
Others have already commented on the specifics for Russia and Saint-Petersburg.