From a medical point of view, Cuba is generally safe as long as you're reasonably careful about what you eat and drink. The most common travel-related diseases, such as dysentery and hepatitis, are acquired by the consumption of contaminated food and water. Mosquito-borne illnesses are not a significant concern on most of the islands within the Cuban archipelago, though Zika virus is known to be present. Pregnant women or women who plan to get pregnant and their partners should check travel advisories before going to Cuba.
Prevention is the key to staying healthy while traveling around Cuba. Travelers who receive the recommended vaccines and follow commonsense precautions usually come away with nothing more than a little diarrhea.
The Cuban government has established a for-profit health system for foreigners called Servimed, which is entirely separate from the free, not-for-profit system that takes care of Cuban citizens. There are more than 40 Servimed health centers across the island, offering primary care as well as a variety of specialty and high-tech services. If you're staying in a hotel, the usual way to access the system is to ask the manager for a physician referral. Servimed centers accept walk-ins. While Cuban hospitals provide some free emergency treatment for foreigners, this should only be used when there is no other option. Remember that in Cuba medical resources are scarce and the local populace should be given priority in free health-care facilities.
Almost all doctors and hospitals expect payment in cash, regardless of whether you have travel health insurance or not. If you develop a life-threatening medical problem, you'll probably want to be evacuated to a country with state-of-the-art medical care. Since this may cost tens of thousands of dollars, be sure you have insurance to cover this before you depart.
There are special pharmacies for foreigners also run by the Servimed system, but all Cuban pharmacies are notoriously short on supplies, including pharmaceuticals. Be sure to bring along adequate quantities of all medications you might need, both prescription and over the counter. Also, be sure to bring along a fully stocked medical kit. Pharmacies marked turno permanente or pilotos are open 24 hours.
Tap water in Cuba is not reliably safe to drink and outbreaks of cholera have been recorded in the past few years. Bottled water called Ciego Montero rarely costs more than CUC$1, but is sometimes not available in small towns. Stock up in the cities when going on long bus or car journeys.