Dishwasher salt is safe to use in a dishwasher, but it should not be eaten, since it contains chemicals other than sodium. Dishwasher salt is made especially for use in dishwashers, and it helps reset the resin balls in the basket that sits inside the dishwasher.
When the salt is added, it allows the resin balls to settle. The resin balls then help eliminate magnesium and calcium ions, softening the water before it is used on the dishes. By adding salt to the dishwasher, things like rust, cloudy glass, and lime buildup can be avoided, helping dishes look cleaner over time.