CHLORINE

They say that chlorine is poisonous, but why do they have to put it in water? How can they know that it is enough or excess?