Dishwasher salt is sodium chloride, the same chemical that makes up table and sea salts. You shouldn’t use table salt though as it is much finer and can block and cause damage to your dishwasher. Dishwasher salt granule size is larger and ensures the salt dissolves slower without blocking the softener unit.
Dishwasher salt doesn’t actually enter the dishwasher instead it flows through the softener unit before being drained with the waste water. Dishwasher salt has much larger granules than regular salt in order to help them dissolve without a risk of creating a blockage which would result in malfunctioned softener unit. For finer salt the risk is real!