Don't overlook time differences. Listen for announcements, and read your daily onboard newsletters to see when you should set your watch forward or back. Further, ship time and local time are often different. Be sure you know exactly what time to be back onboard after a day in port, and verify whether that time means the ship's time or the port's time. Also make sure you don't lose track of the hours while you're off having fun ashore. We know it can be easy to have a few too many pina coladas at Senor Frog's, but that's no excuse to be late getting back to your ship. If you're worried, bring your cell phone, put it on airplane mode, and set an alarm so you'll know when it's time to start heading back to the pier.
If a ship-sponsored excursion is late returning to port for some reason, the ship will either wait for you, or the line will take financial and logistical responsibility for getting you to a subsequent port of call to meet up with your ship. If you book a private excursion and it's running late, the ship won't always leave without you -- particularly if you're on the tour with a large number of your fellow passengers -- but there's no guarantee that it will wait. If you do decide to go the private tour route, do some research ahead of time. Check to be sure the excursion provider has a track record of punctuality, and aim to be back at the ship an hour or two -- rather than a few minutes -- before the "all aboard."
Take photocopies of passports, driver's licenses (both sides) and credit cards (both sides) ashore with you (if you're not taking the actual cards), as well as phone numbers for your ship, port agent (often found listed on the daily schedules you'll receive onboard each day) and your cruise line's customer service department. In addition, you should have the address and phone number of your country's embassy in the port you're visiting. (Other helpful contacts might include your travel agent or your travel insurance hotline, where relevant.) This information -- which should be kept on you, preferably somewhere other than a wallet or backpack, which could be lost or stolen -- will be essential for helping you figure out what to do if you miss your cruise ship.
Most cruise lines have port agents stationed in the port area to assist if your ship has left without you. In cases when cruisers are late returning to the vessel, the ship's crew will often remove the passengers' essential items -- passports, cell phones and medication -- from the ship to leave with the port agents. These officials can help you with contacting your ship and making travel arrangements.
Pull out that trusty list of aforementioned phone numbers, and start by calling your ship to let them know where you are and figure out next steps, including how and where to meet up with the vessel in one of the next ports on the itinerary. You might also have to call your cruise line's customer service department to let them know what happened and see if they can assist with booking necessary interim accommodations and travel. Finally, if you find yourself without proper identification, you can't get through to your ship or cruise line, or you don't speak the local language to ask for help, call the U.S. embassy (or the embassy of your country if you're not American) closest to the port you're visiting, or show the address to a taxi driver who can take you there (during normal weekday business hours). The folks at the embassy can help you to figure out next steps and potentially put you in contact with someone who can help you to reach your ship or return home.