You just have to know how to deal with the situation. To this effect, here's a few pieces of advice that medical professionals recommend you follow:
Bring along some medication
Especially if you know you suffer from certain allergies or affections, it's important that you bring your "stash" of medicine from home. Also take a copy of the prescription in case you may need more. Even the most accessible pills in your country may be difficult to find somewhere else or they can be actually really expensive.
Be well informed
The medical system can be quite different from one country to another. Some places have universal health care, but you need to know about it. It can help you save some real money, so do your research ahead, ask a local or check out an expat group's opinion and so on. It's also good to know about the local hospitals or medical centers so you don't end up getting treatment from dr. Frankenstein.
Get travel health insurance
Travel health insurance is not only for old people, you know. It can come in hand when you're on vacation in pretty much any country. In case you find yourself in the situation of having to use it, believe me, you will be thrilled you have it. It would be a pity to have to spend all your vacation money on medical treatments otherwise. The cost of travel health insurance is insignificant compared to the money you save if you need to use it. Think about it!
Have copies of your medical info and know a few words in this field
It's important to keep copies of your medical information, including allergic reactions, blood type info, etc. somewhere in hand (your pocket, wallet, etc.). Any info that might help your doctor get you the right treatment is good to have on. Remember, they can't just look at you and know if you're allergic to something or if you're using some sort of medication, and so on. Some doctors may speak English abroad too, but just in case, you may wish to learn a few basic words, such as "pain", "medicine", etc. You don't want to leave the medical facility with a bandaged arm when in fact you suffer from an indigestion.
Be aware of your insurance plan
Contact the insurance company before you fill a medication prescription. Make sure you can afford it. Though if you're on holiday in Spain for example things might work a little different when it comes to medical treatment than in your country, don't be afraid to ask questions. It is your right, after all. Ask away what services you need to pay for exactly, also if you're not comfortable with something... say it. Be respectful but don't be afraid to be well informed.
Write everything down and contact your family doctor once you leave the hospital
Your family doctor may have some further advice for you, so let them know exactly what the diagnosis is, what you were told to do in matters of treatment and so on. If anything, it can't hurt.
Don't stop enjoying your vacation
If you catch a cold on your holiday to Italy for example, that doesn't have to prevent you from enjoying a bus or a boat tour and exploring the surroundings. This way you don't have to spend that much energy either. Go see a show or simply enjoy the facilities of your holiday accommodation. It's a cold after all, not the Apocalypse.
Falling sick in a foreign land is not a pleasant experience indeed. Though you cannot predict and prevent all sickness, if you're careful enough and take some precautions you can surely ease the situation. Lots of health and enjoy your travels!