Avoid swimming with contact lenses, wear swim goggles, and rinse your eyes with saline solution after swimming in natural bodies of water to prevent infections from bacteria or algae.