First rule: do not tough it out alone in a hotel room hoping it passes. For mild issues like a cold, upset stomach or minor fever, a pharmacy is the right first stop in most countries; pharmacists abroad are often far more empowered than at home and can recommend or dispense effective remedies directly. In many places they will also tell you honestly whether you need a doctor.
For anything more serious, persistent high fever, dehydration, breathing trouble, chest pain, injuries, or symptoms after mosquito bites in tropical regions, go to a clinic or hospital the same day. Private clinics in big cities usually have English-speaking staff and shorter waits, while public hospitals are the right call for genuine emergencies.
A few practical moves: call your travel insurance hotline early, since they can direct you to approved facilities and arrange payment; keep receipts for everything; and ask your hotel or host for the nearest recommended clinic, because they handle this question constantly. If things feel serious and you are unsure where to go, your country's embassy can usually point you to reputable hospitals used by their own staff.