Salt is used to make the dishes cleaner. Salt combats limescale on your dishes; this is especially common and shows up in the form of rings on glasses that have been rinsed in a dishwasher without salt.
How much salt you need to use, and how often to add it, depends on how hard the water is in your area and how the dishwasher is set up. Check these details with the manufacturer and with the local authority where you live.