To prevent leptospirosis, use clean water, wear protective clothing when handling water, keep wounds clean, wear masks in contaminated areas, control rat populations, maintain cleanliness of pets, and avoid stagnant water in agricultural areas.