If you miss the ship, you'll have to either meet it in a subsequent port of call or call it a wash and head home. Your cruise line, travel agent or travel insurance provider might be able to help you make the plans; otherwise, you'll have to make arrangements on your own.
Many travelers don't even realize it's an option, but YES you can get your passport stamped at many cruise ports! Many Caribbean and Central American cruise ports offer passport stamps at the Customs office once you are off the cruise ship.