Ambulance reliability is one of the sharpest divides between countries. In much of Western Europe, North America, Japan, Australia and similar systems, calling the emergency number gets you a well-equipped ambulance quickly and that is unambiguously the right move. In many developing countries, however, public ambulances can be slow, sparsely equipped, or hampered by traffic, and locals themselves often take a taxi or private car to hospital for anything where the patient can be moved safely. Expat communities in each city know which approach works locally, and it is worth asking early in your stay.
Private ambulance services exist in many big cities and are often faster and better equipped, and larger private hospitals frequently run their own fleets; saving the direct number of the nearest good private hospital can beat the general emergency line in some places.
Two caveats to the taxi strategy: for suspected spinal injuries, heart attacks or strokes, trained transport matters, so try the ambulance route first when the condition is critical. And if you carry travel insurance with an assistance hotline, they can dispatch or coordinate transport, including medical evacuation from remote areas, which no taxi can replace.