Slugs and snails have a very high percentage of their body-weight made up of water, compared to other animals. Additionally, their skin is a much more permeable to water loss as well as ions and other small molecules, this is why they must keep their skin very moist.
When salt comes into contact with the skin of a slug or snail, osmosis drags water out through the cells lining the skin due to the sudden high concentration of a pure salt crystal on the surface of its skin. Certain species can deal with small crystals of salt by excreting large amounts of mucus in the area, reducing contact and water loss.
However, when the salt load is too much, large amounts of water are osmotically drawn out the snail and results in severe dehydration. The snail will lose volume due to water loss and will no longer be able to carry out basic cellular function.
This is an efficient and cruel way to kill snails.