I know for Barcelona, you just walk right off the pier and you're in the city. You can also pick up one of those all day on/off sight-seeing buses not too far from the terminal. Venice - Princess provided ongoing water taxi service from the ship to the center of the city. Not sure if all ships do - check with your cruise line. Naples - you are also right in the city. Also right by the pier for ferries - so you can hop on a ferry to Capri right there if you're interested.
Enjoy your cruise!