I've bought two brands of salt that are completely different in terms of 'salt' concentration(not sure if this is the correct terminology). I realized this because I needed three or four times more teaspoons of one brand in order to match the saltiness of the other when making the same recipe. Chemically speaking, what is accounted for the difference? Which one is better for cooking? If I recall correctly from the chemistry classes, salts have crystal structures embedded with water molecules; could the concentration of water molecules be the determinant factor?
Summary for the Quick Reader
Only the shape and size of the grains really makes a difference. Otherwise, salt is salt.
What makes a difference between salts?
There are only two real differentiators between different types of salt (assuming the product is essentially just salt, and not a seasoning blend):
Note that almost any salt you buy will be quite dry—there will be negligible water content.
Reasonable blind tests show that despite chic chef use of fancy salts, almost no one can tell the difference between salts with different impurities based just on their flavor. When in other foods, any difference from this practically vanishes.
The second aspect, the nature of the salt crystals or flakes, is very salient.
Large crystals dissolve more slowly, and provide crunch between the teeth, and texture you can feel with your lips and tongue.
Certain types of salt, such as fleur de sel and some brands of kosher salt have large, less dense crystals or flakes with a lot of air in them. These two factors together mean that per unit of volume, there is simply less weight of salt than there would be for the same unit of volume of a salt like US style table salt with very small, uniform crystals. That is, a teaspoon or mL of fleur de sel will simply weight less than a teaspoon or mL of table salt.
This means that when added to a dish by volume, it is simply less salty, because you have added less actual salt—the rest of the volume in the measuring spoon was air.
Common types of culinary salt
The overall size of the crystals lends different salts to different uses. I will use US terms since they are the only ones I know. From smallest to largest grain size (more or less), some common salt products are:
What salt performs best?
I cannot say that any particular salt is better to cook with. Many cooks use a small variety of salts depending on what they are doing. If you were to pick only one salt to have in the kitchen, I would recommend table salt which is not perfect for every use, but pretty good at most.
For a reasonably stocked but not extravagant pantry, I would choose:
Either of the above will serve well for general savory cooking, although you would use less table salt (by volume) than kosher salt, as indicated above.
Note that by putting kosher or table salt in a spice grinder, you can grind it down to popcorn or pickling salt size, so buying this is rarely necessary unless you want a lot, as for a day of pickling.
The exotic salts
There are some exotic salts out there, which might have extraordinarily high mineral levels or other properties (such as pink salts from Hawaii), but the above covers most usual types of salts that are available.
Chemically, all normal culinary salt is the same thing, discounting trace impurities: sodium chloride. There are curing salts and salt substitutes which consist of or contain other chemicals, like sodium nitrate or potassium chloride. I don't discuss these in this answer. Note that so-called "pink salt" (in at least some of its meanings) is a curing salt blended from sodium chloride and sodium nitrate.
Some minimally processed salts (such as sea salt) will have a tiny percentage of other chemical salts in them.
Update March 2013: Serious Eat's has published an interesting article talking about the differences between regular and kosher salt: Ask the Food Lab: Do I need to use Kosher Salt