It depends - anything from a few hours 'tech' stop in places like Ensenada for legal reasons, to overnight in Rome or Livorno or the Cannes Fillm Festival to 3 days in Rio for the Carnival..... What ship and what itinerary?
The majority arrive in port around 7 a.m and leave between 5 and 7 p.m. but depending on distance between ports it might be a midday arrival and a 7 p.m. departure but we always find there is never enough time to fit all you want to do, but is gives you a sample to see and maybe return later.
Why don't you call in any travel shop, pick up every cruise brochure on the shelf & every itinerary of times of port arrival & departures are shown for all the cruises available. Regards.
The idea behind cruising - is to cruise. If we want to stay in a port/country that we have 'sampled' on the cruise, then we book a hotel stay in the traditional way. If you want to spend evenings in port then maybe Easycruise is for you. They often stay overnight so you can dine out and enjoy the nightlife before cruising to the next port.
On some long cruises ships can remain in port for 2 or 3 days. On a "Round South America" voyage of 72 nights we stayed in Rio for 2 nights and Lima for 3. This allowed for excursions into the Andes etc. On shorte cruises there might be the odd overnight stop or, more likely, a late sailing at around midnight.