Viruses, bacteria, parasites, food intolerances and certain medicines can cause diarrhea. However, often no cause can be found for the diarrhea. To treat diarrhea, you need to replace the fluids and salts that the body has lost [source: National Digestive Diseases Information Clearinghouse].

  • Adults should drink plenty of fluids so as not to become dehydrated.
  • Children should drink an electrolyte rehydration solution such as Pedialyte, which can be bought without a prescription.
  • If a food or medication is causing the diarrhea, it should be avoided [source: National Digestive Diseases Information Clearinghouse].

According to the National Digestive Diseases Information Clearinghouse, you should avoid the following foods when you have diarrhea, because they can exacerbate the symptoms:

  • Milk and dairy products
  • Greasy or high-fat foods
  • Foods that contain a lot of fiber
  • Sweets

The doctors at Three Rivers Endoscopy Center for Digestive Health & Nutrition instead recommend that you instead eat soft, bland foods such as those on the "BRATT diet":

  • Bananas
  • Rice
  • Applesauce
  • Toast
  • Tea

If your diarrhea is caused by a parasite or bacterial infection, anti-diarrheal medications aren't recommended. Stopping the diarrhea will just trap the offending organism in your intestines and prolong your illness. Your doctor may prescribe an antibiotic or other medication to treat the underlying illness instead of the symptom [source: National Institutes of Health].

Although it's usually not harmful, diarrhea can become dangerous or signal a more serious problem. You should talk to your doctor if you have strong pain in your abdomen or rectum, a fever, blood in your stools, severe diarrhea for more than three days or symptoms of dehydration. If your child has diarrhea, don't hesitate to call the doctor for advice, since diarrhea can be dangerous in children [source: Medline Plus].