Salt-water swimming pools convert sodium chloride (NaCl - salt!) into free chlorine. The salt is added directly to the pool and the pump simply circulates the water past a specialist electrical unit that does the conversion.
Nowadays the units are sophisticated so they are able to titrate the right amounts that are produced making pool chemistry easier and cheaper to maintain. However a downside is that there are the initial start up costs of buying the salt water chlorinator.