In the modern world salt is so universal, and so easily available, it's easy to forget what an interesting and versatile substance it is. Besides making snack foods addictive, it's widely used in industrial processes and chemical laboratories. Salt is also an important preservative, used in food preservation and embalming for thousands of years. Oddly, it is salt's preservative effect that makes it lethal to leeches and similar creatures.
Salt as a Preservative
During the 20th century, scientists came to an unprecedented understanding of food safety, derived from an intensive study of bacteria and other microorganisms. For bacteria to grow they need favorable conditions including moderate temperatures, a slight degree of acidity and a small amount of moisture. Salt preserves food by a process called osmotic pressure. When salt is present, it will draw moisture out of cells through the cell walls, leaving the inside of the cells much dryer than before. When salted heavily, there is too little enough water left in the cells to support microbial life.
Salt as Poison
It's well known that too much salt can have damaging effects on living cells, which is why so many Americans are on low-sodium diets. However, the problem of excess salt is more immediate for leeches because their skins are permeable; unlike ours, they allow the free passage of moisture. When leeches are doused in salt, it creates an osmotic pressure that draws moisture from their cells in exactly the same way it does with a ham. As with the bacteria in food, drying out the cells makes them incapable of supporting life.
Uses & Limitations
Salt is an effective way to kill leeches and other pests, such as garden slugs, but only on a small scale. If your favorite swimming spot is plagued with leeches, introducing enough salt to the water to kill them would also be devastating to the rest of the ecosystem. Trapping the leeches is a better option. Put a piece of meat in a coffee can and make small holes in the lid and then submerge it in your lake or pond. Leeches will find it and make their way into the can, but be unable to get back out.
Although they are a nuisance for swimmers, and a cause of some revulsion to the squeamish, leeches are not dangerous to humans. They'll take a small amount of blood and drop off of their own accord once full. They have been used medicinally for thousands of years, and are still sometimes used by modern doctors to treat blood clots and similar problems. The anticoagulant ingredient in leech saliva, called hirudin, was isolated in the laboratory during the 1950s and is now widely used in medicine to prevent clotting.