Virtually every cruise ship (except for some smaller vessels operating in coastal waters) has a fully equipped medical facility and staff to handle medical emergencies.
It is strongly recommended to purchase travel insurance to cover unexpected medical issues, as these services are not covered as part of your cruise fare.