Salt is essential to life, at least animal life: it regulates fluid balance and aids in movement, nerve impulses, digestion, and the healing of wounds. All vertebrates contain about 9 grams of salt per litre of blood; the ocean contains four times as much salt as blood does, in case you were wondering.
The good Johnath is correct that all salt is, in essence, sea salt, for salt mines are indeed simply dried up old oceans. They are generally underground, and when the area is mined, only about half the salt is removed; the other half remains as pillars that prevent the mine from collapsing. The largest salt mine in the world is right here in my home province of Ontario; it extends several miles under Lake Huron, and isn't actually mined. Instead, water is pumped down into pockets in the salt bed, and then pumped back up as brine; the water is then boiled off, leaving almost pure salt.
In ancient times not everyone had easy access to salt, so it was considered precious in some places. Intrepid explorer Marco Polo reported that in Tibet salt cakes were pressed with an image and used as currency; salt bars were similary employed in Ethiopia. In ancient times salt was used for alomancy, a kind of divination. The Greeks traded slaves for salt, and a bad slave was "not worth his salt". Roman soldiers were paid a salarium argentium to allow them to buy salt; this is the origin of the word salary. In 2200 BC the Chinese emperor Hsia Yu levied a tax on salt, creating a nasty precedent that we have been unable to extricate ourselves from to this day; the French Revolution was precipitated, in part, by the notorious gabelle, or salt tax. And I must mention salt's connection with bad luck, at least if it's spilled; Leonardo da Vinci's The Last Supper graphically represents this connection by showing Judas Iscariot as having knocked over a bowl of salt. If you spill salt, throw some over your left shoulder to blind the spirits who lurk there, taking care, of course, not to similarly incapacitate the good guys on your right side. (Or so they say, anyway; do take this sage advice with a grain of salt.)
Salt became an essential ingredient for its preservative qualities, and although we think of the modern diet as high in salt, we would apparently be shocked if we tasted beef, pork, or fish in the style of a few hundred years ago, for it was heavily salted to keep it from rotting. Why does this work? Because salt draws the water out of bacteria, causing the evil things to die. Today salt is used as a preservative in foods like bacon and cheese. And of course it's a very popular flavour enhancer, as my able colleagues have mentioned.
When salt became a common table condiment, it was sold in blocks and ground at home. It was served in salt cellars (basically a small pot or bowl with a lid and a spoon) which were placed near the host at the head of the table. Where one sat in relation to the salt (and the host) - "above the salt" or "below the salt" - was a marker of relative status. In the early twentieth century moisture-absorbing agents began to be added to salt, and it was sold as a powder. Hence the salt cellar was replaced by the salt shaker, though the two terms are sometimes used interchangeably.
Among the varieties of salt not mentioned above are the grey moist sel gris and the off-white lacy fleur de sel from France; they are considered to be the champagne of sea salts. Flaky white Maldon salt is harvested in Essex, England; Hawaiian salt is pinky and contains clay; black rock salt from India is actually pink and sulphurous smelling (but not, apparently, so tasting); and Korean bamboo salt is made from sea salt poured into bamboo cylinders which are plugged with clay and roasted over a resinous pine fire. There's also a type of low sodium salt that substitutes potassium chloride for some of the sodium chloride.
Much of this pleasing trivia was gleaned from an article in LCBO's Food and Drink magazine, fall 2001.