The most common types of illnesses are caused by contaminated food and water. Especially in developing countries, drink only bottled, boiled, or purified water and drinks; don't drink from public fountains. That said, ice in most major hotels and restaurants is tourist friendly. You might consider using bottled water to brush your teeth, although most hotels in Los Cabos have water purification systems. Make sure food has been thoroughly cooked and is served to you fresh and hot; avoid vegetables and fruits that you haven't washed (in bottled or purified water) or peeled yourself. If you have problems, mild cases of traveler's diarrhea may respond to Imodium (known generically as loperamide) or Pepto-Bismol. Be sure to drink plenty of fluids; if you can't keep fluids down, seek medical help immediately.
Infectious diseases can be airborne or passed via mosquitoes and ticks and through direct or indirect physical contact with animals or people. Some, including noroviruses that affect your digestive tract, can be passed along through contaminated food. If you're traveling in an area where malaria is prevalent, use a repellent containing DEET and take malaria-prevention medication before, during, and after your trip as directed by your physician. Condoms can help prevent most sexually transmitted diseases, but they aren't absolutely reliable and their quality varies from country to country. Speak with your physician and/or check the CDC or World Health Organization Web sites for health alerts, particularly if you're pregnant, traveling with children, or have a chronic illness.
Do not fly within 24 hours of scuba diving.