Chlorine is added to swimming pools to kill germs. When chlorine is added to water, it forms hypochlorous acid which kills bacteria like E. coli and salmonella, as well as viruses that cause diarrhea and swimmer's ear. Chlorine acts as a disinfectant in swimming pools, killing harmful microbes through the formation of hypochlorous acid.