Cruise ship passengers have the right to visit Russia (for example, St. Petersburg) for up to 72 hours without a Russian visa, but there are limitations on what they can do. You have to be accompanied on land at all times by a licensed tour guide (with a specific state license for accompanying cruise passengers without visas) and you have to sleep on the ship.

If you would like to have greater freedom to explore the city under your own steam, it is worth getting Russian Tourist visa before you set out on your cruise. In order to do this, you can either book accommodation in Russia or buy visa support documents from a local agency. As shore tours with licensed guides are generally quite pricey, getting Russian visas is not necessarily the more expensive option.