In general, doctors do not recommend routinely using medications to stop diarrhea, especially if you have a fever. However, there are occasions when you may want to temporarily stop diarrhea (for travel or a meeting), especially if you have an irritable bowel where you tend to loose stools if you are anxious. To stop these occasional bouts of diarrhea, keep over-the-counter liquid and pill forms of Imodium in your medicine cabinet. Do not use them beyond one day unless your doctor recommends this treatment.
The most important thing with diarrhea is to stop dairy products for a couple days, as you become temporarily lactose intolerant after a day of loose stools.
Acidophilus (probiotics) tablets can be useful for preventative use of diarrhea if you need to take an antibiotic (to avoid diarrhea that results from the antibiotic killing off the good bacteria in the gut).