With only 4 hours - just stay in the airport.

Assuming the layover is on the way to the Caribbean it will take at least an hour to deplane, exit the airport and get taxi to nearest "beach or fun area". Add another 30 to 45 minutes to clear Immigration & Customs if layover is on your return from the Caribbean. You'll need another 30 to 45 minutes to get back to the airport and yet another 15 to 30 minutes to clear TSA. Finally, your outbound flight will begin boarding about 30 minutes prior to scheduled departure. What this all means is if you leave the airport you'll only have about an hour or so of "free time". Not worth the effort.

Get an Admirals Club Pass, have a meal at one of the many airport restaurants, browse the airport shops, have a few drinks at one of the airport bars and any combination of the foregoing.

Go to the MIA website for a list of restaurants & Shops: www.miami-airport.com