Water with dissolved calcium and magnesium, commonly referred to as “hard water”, is a problem for dishwashers because it reduces the ability for soap to dissolve well and form a good lather, which decreases the effectiveness of the dishwasher. Water softeners use a negatively-charged resin to attract the positively-charged magnesium and calcium out of the water, but eventually the resin is completely covered in magnesium and calcium and can’t suck any more out of the water. Luckily, if the resin is submerged in salty water, the sodium ions from the salt displace all the magnesium and calcium which can then be removed. When the water softener is in operation again, you are displacing some sodium ions into the water you want to use, but that isn’t a problem because sodium doesn’t affect soap in the same way as calcium and magnesium.
Latest Answers