Table salt is a chemical compound. Its chemical name is sodium chloride. It is present in the bloodstream in solution as sodium ions and chloride ions. It is the sodium ions that are involved in the fluid retention that causes weight gain. This webpage tells you more about sodium in food.
If you want to get the hang of it better, I suggest you read http://www.wildeaboutsteroids.co.uk/lose_weight.html and http://www.wildeaboutsteroids.co.uk/obesity_and_the_salt_connection.html