The main cause of a stomach bug, also known as gastroenteritis, is a viral infection often brought on by bacteria in the body, according to WebMD. People can contract a stomach bug through contact with an infected person or by consuming contaminated water or food, as Mayo Clinic explains.
Viruses that cause a stomach bug include noroviruses and rotavirus, according to Mayo Clinic. Noroviruses are foodborne illnesses that typically spread through contaminated water or food, but it is also possible to contract a norovirus from an infected person. Rotavirus is transmitted when people put their fingers in their mouths after touching objects contaminated with the rotavirus. Rotavirus is more common among children and infants.
A stomach bug affects the intestines and can cause abdominal pain, stomach cramps, watery diarrhea, nausea and vomiting, as Mayo Clinic explains. Some patients experience a low-grade fever, headaches or muscle aches. Symptoms can be mild or severe and begin to appear one to three days after a person has been infected with the viral infection. Symptoms can persist for as long as 10 days, but they usually only last one or two days. Treatment commonly includes increasing fluids, taking ample rest and avoiding foods that can worsen nausea, such as fatty foods, dairy products and caffeine.