Most cases of diarrhea last for only 2 to 3 days and if the diarrhea lasts longer than 3 days then it's a good idea to see your doctor or go to urgent care.
Or if the diarrhea is accompanied by severe, unbearable pain in the abdomen or rectum or a 102 degrees F or higher fever or you have 6 or more loose stools in 24 hours then you should see a doctor or go to urgent care for the diarrhea.
When you have diarrhea your body also gets dehydrated too so it's a good idea to drink some water or juice or even pedialyte which will help replace any lost electrolytes in your body.
You can also buy over the counter diarrhea medicine that helps stop diarrhea.