Diarrhea—loose, watery stools occurring more than three times in one day—is a common problem that usually lasts a day or two and goes away on its own without any special treatment. However, prolonged diarrhea can be a sign of other problems. People with diarrhea may pass more than a quart of stool a day.
Diarrhea can cause dehydration, which means the body lacks enough fluid to function properly. Dehydration is particularly dangerous in children and the elderly, and it must be treated promptly to avoid serious health problems. (See "What is dehydration?")
People of all ages can get diarrhea. The average adult has a bout of diarrhea about four times a year.
Diarrhea may be caused by a temporary problem, like an infection, or a chronic problem, like an intestinal disease. A few of the more common causes of diarrhea are
Bacterial infections. Several types of bacteria, consumed through contaminated food or water, can cause diarrhea. Common culprits include Campylobacter, Salmonella, Shigella, and Escherichia coli.
Viral infections. Many viruses cause diarrhea, including rotavirus, Norwalk virus, cytomegalovirus, herpes simplex virus, and viral hepatitis.
Food intolerances. Some people are unable to digest some component of food, such as lactose, the sugar found in milk.
Parasites. Parasites can enter the body through food or water and settle in the digestive system. Parasites that cause diarrhea include Giardia lamblia, Entamoeba histolytica, and Cryptosporidium.
Reaction to medicines, such as antibiotics, blood pressure medications, and antacids containing magnesium.
Intestinal diseases, like inflammatory bowel disease or celiac disease.
Functional bowel disorders, such as irritable bowel syndrome, in which the intestines do not work normally.
Some people develop diarrhea after stomach surgery or removal of the gallbladder. The reason may be a change in how quickly food moves through the digestive system after stomach surgery or an increase in bile in the colon that can occur after gallbladder surgery.
In many cases, the cause of diarrhea cannot be found. As long as diarrhea goes away on its own, an extensive search for the cause is not usually necessary.
People who visit foreign countries are at risk for traveler's diarrhea, which is caused by eating food or drinking water contaminated with bacteria, viruses, or, sometimes, parasites. Traveler's diarrhea is a particular problem for people visiting developing countries. Visitors to the United States, Canada, most European countries, Japan, Australia, and New Zealand do not face much risk for traveler's diarrhea.
Diarrhea may be accompanied by cramping abdominal pain, bloating, nausea, or an urgent need to use the bathroom. Depending on the cause, a person may have a fever or bloody stools.
Diarrhea can be either acute (short-term) or chronic (long-term). The acute form, which lasts less than 4 weeks, is usually related to a bacterial, viral, or parasitic infection. Chronic diarrhea lasts more than 4 weeks and is usually related to functional disorders like irritable bowel syndrome or inflammatory bowel diseases like celiac disease.
In most cases, replacing lost fluid to prevent dehydration is the only treatment necessary. Medicines that stop diarrhea may be helpful in some cases, but they are not recommended for people whose diarrhea is caused by a bacterial infection or parasite—stopping the diarrhea traps the organism in the intestines, prolonging the problem. Instead, doctors usually prescribe antibiotics. Viral causes are either treated with medication or left to run their course, depending on the severity and type of the virus.
Preventing Dehydration 
Dehydration occurs when the body has lost too much fluid and electrolytes (the salts potassium and sodium). The fluid and electrolytes lost during diarrhea need to be replaced promptly—the body cannot function properly without them. Dehydration is particularly dangerous for children, who can die from it within a matter of days.
Although water is extremely important in preventing dehydration, it does not contain electrolytes. To maintain electrolyte levels, you could have broth or soups, which contain sodium, and fruit juices, soft fruits, or vegetables, which contain potassium.
For children, doctors often recommend a special rehydration solution that contains the nutrients they need. You can buy this solution in the grocery store without a prescription. Examples include Pedialyte, Ceralyte, and Infalyte.
Tips About Food 
Until diarrhea subsides, try to avoid milk products and foods that are greasy, high-fiber, or very sweet. These foods tend to aggravate diarrhea.
As you improve, you can add soft, bland foods to your diet, including bananas, plain rice, boiled potatoes, toast, crackers, cooked carrots, and baked chicken without the skin or fat. For children, the pediatrician may recommend what is called the BRAT diet: bananas, rice, applesauce, and toast.