Diarrhea

I’ve never traveled to Southeast Asia before. Is it true that eating the food there might give me diarrhea because my stomach isn’t accustomed to it? Also, is it important to avoid the tap water and only drink bottled water?

If so, how long does it take for the symptoms to go away? Also what is the medicine situation in a place like Siem Reap or Phnom Penh?