The first step in treating diarrhea in pigs is to assess the severity of the condition. Mild cases may require supportive care such as fluid therapy to prevent dehydration. Electrolyte solutions that restore hydration and nutrient balance are often administered orally or intravenously, depending on the pig's age and health status.