You may not be able to purchase, or even require all the items on this list (depending on where you are and where you are travelling), and in some cases you may need a doctor's prescription to avoid having the items confiscated by border police or customs officers if your bags are inspected. If in doubt, consult a competent medical professional for advice.
Many people have different ideas on what is necessary for them - some people take more, others are better at improvisation.
Regular Medication: If you are taking any form of regular medication, take a good supply with you, together with a copy of the prescription. Make sure it's carried in hand luggage on planes. The prescription will help if you do need to replace it, or customs are unsure about what it is.
Antidiarrhea: Loperamide Hydrochloride (e.g. Imodium) is the most common form of anti-diarrheal medicine for over the counter use. Never use it if there is blood in the feces - this could be an indication of something much more serious and requires immediate medical attention.
Anti-inflammatory: Ibuprofen (e.g. Nurofen) is good both as an anti-inflammatory and also as a general analgesic (pain killer). Other people prefer to use Paracetamol, or an Aspirin/Paracetamol combination.
Sunscreen: Make sure you take an appropriate level of protection for your skin and the area you are visiting. An after-sun lotion containing aloe might help, too.
Adhesive bandages: Irritating if you cut yourself and you have none available. Also useful for covering blisters on your feet.
Anti-Bacterial: Such as neosporin, handy to have for treating popped blisters, cuts, and burns once they have cooled; this will help to prevent infections.
Insect repellent: if you are traveling to an area where biting insects are a problem. Plan ahead, as in many areas where mosquitoes and other insects are a significant problem, effective DEET-based repellents cannot be bought locally.
Condoms: HIV and Hepatitis are much more common in some parts of the world, and unprotected sex with an unfamiliar partner is highly risky anywhere. If you're a guy traveling with a female partner who uses a contraceptive pill, it's still worth taking condoms as a precaution, as even minor stomach upsets can decrease the pill's effectiveness. (Having said that, if she's not feeling well, you probably won't need them!)
If you are going away from major towns and cities where medical help may not be accessible, you might like to consider taking a more complete first aid kit. Make sure you have the knowledge to use it, too! Consider water purification tables, sterile sets, and so on.
Also, travelers may wish to take a comprehensive first aid course if traveling for an extended amount of time in a rural area. The knowledge from courses such as Wilderness First Aid or Wilderness First Responder can come in handy when away from hospitals.