Sea salt is mentioned in the Vinaya Pitaka, a Buddhist scripture compiled in the mid-5th century BC. The principle of production is evaporation of the water from the sea brine. In warm and dry climates this may be accomplished entirely by using solar energy, but in other climates fuel sources have been used. Modern sea salt production is almost entirely found in Mediterranean and other warm, dry climates.
Such places are today called salt works, instead of the older English word saltern. An ancient or medieval saltern was established where there was:
# Access to a market for the salt
# A gently shelving coast, protected from exposure to the open sea
# An inexpensive and easily worked fuel supply, or preferably the sun
# Another trade, such as pastoral farming or tanning—which benefited from proximity to the saltern (by producing leather, salted meat, etc.) and provided the saltern with a local market
In this way, salt marsh, pasture (salting), and salt works (saltern) enhanced each other economically. This was the pattern during the Roman and medieval periods around The Wash, in eastern England. There, the tide brought the brine, the extensive saltings provided the pasture, the fens and moors provided the peat fuel, and the sun sometimes shone.
The dilute brine of the sea was largely evaporated by the sun. In Roman areas, this was done using ceramic containers known as briquetage. Workers scraped up the concentrated salt and mud slurry and washed it with clean sea water to settle impurities out of the now concentrated brine. They poured the brine into shallow pans (lightly baked from local marine clay) and set them on fist-sized clay pillars over a peat fire for final evaporation. Then they scraped out the dried salt and sold it. 
In traditional salt production in the Visayas Islands of the Philippines, salt are made from coconut husks, driftwood, or other plant matter soaked in seawater for at least several months. These are burned into ash then seawater is run through the ashes on a filter. The resulting brine is then evaporated in containers. Coconut milk is sometimes added to the brine before evaporation. The practice is endangered due to competition with cheap industrially-produced commercial salt. Only two traditions survive to the present day: asín tibuok and túltul (or dúkdok).
In the colonial New World, slaves were brought from Africa to rake salt on various islands in the West Indies, Bahamas and particularly Turks and Caicos Islands.
Today, salt labelled "sea salt" in the US might not have actually come from the sea, as long as it meets the FDA's purity requirements. All mined salts were originally sea salts since they originated from a marine source at some point in the distant past, usually from an evaporating shallow sea.