In most destinations, tourist zones are actually well served: major cities keep large public and private hospitals within a short ride of central districts, and resort areas typically have at least a private clinic or small hospital nearby, with serious cases transferred to the nearest big city. The useful homework on arrival is identifying two places: the nearest facility of any kind for emergencies, and the nearest large private or international hospital where foreigners are routinely treated, since those aren't always the same building.
Ambulance systems vary more than people expect. Some countries run a single public service dispatched via the emergency number; others have parallel systems where each private hospital operates its own ambulances you can call directly, which often respond faster and take you to their facility. In heavy-traffic cities, locals frequently take a taxi for anything short of critical because it's quicker, and that's legitimate local knowledge, not negligence.