Source: Chlorine reacts with ammonia in a process called chloramination. It is used in drinking water and pools as a disinfectant.

Summary: Chloramines form as a byproduct of reactions that occur during the disinfection process of water treatment, specifically when ammonia reacts with chlorine to produce monochloramine. This process is called chlorimation. The other chloramines are dichloramine and trichloramine. Ammonia is added during this process in attempts to reduce the chlorinated byproducts that may exist as contaminants in drinking water.