If you live on or near the coast, you may have been invited to a crab or lobster boil. Those tasty crustaceans are fully armored, which is why they can be actually boiled in water without becoming inedibly rubbery or losing their fine flavor. Clams open when they're cooked, so they don't share that immunity. In practice, they should never really be boiled. Instead, you "boil" clams by steaming them over -- not in -- boiling water.
Soft and Hard
Clams fall into two general categories, hard-shell and soft-shell. Don't expect soft-shell clams to actually have soft shells, because that isn't the case. It simply means that their feeding siphon, sometimes called the "foot," doesn't retract into the shell. In either case, the clams you cook should still be alive and healthy when they go into the pot. Hard-shell clams should shut tightly when you tap them. Soft-shell clams can't do that, but if you tap on the siphon it should retract slightly.
Clams cook quickly, so you don't need a lot of liquid in the bottom of your pot. Usually 1/2 inch is enough. Lining the bottom of the pot with a wire trivet or a nest of seaweed raises your clams above the level of the water, helping keep the bottom layer from overcooking.
Pour in the water, or other cooking liquid, and add the trivet or seaweed if you're using them.
Bring the pot to a boil. Rinse any surface grit from the clams under cold running water, while the pot heats.
Pour the clams into the pot and cover it tightly with a lid.
Steam the clams for 7 minutes, shaking occasionally, then lift the lid -- be careful, a gust of hot steam will escape -- and peek inside. If most of the clams are open, they're done. If half or fewer than half have opened, replace the lid and steam for another 2 to 3 minutes.
Shake the clams out of the pot into a colander, or lift them out with tongs or a slotted spoon, and serve immediately.
Raising the Bar
Simply steaming the clams and enjoying their natural flavor is a perfectly fine option, but you can also raise the flavor bar pretty easily. Adding a splash of wine, beer or fruit juice to the steaming liquid adds instant flavor, and so can a handful of chopped herbs. Better yet, turn the steaming liquid into a sauce as the French do. Simmer white wine with shallots, peppercorns or other flavorings, then add the clams. Once the clams have cooked, strain the wine -- now enriched with the juices from the clams -- and pour it over the shellfish in their serving bowls.
To Purge or Not to Purge
Clams live in the sand and siphon nutrients out of seawater, so that water naturally contains sand and grit. The grit accumulates inside the clams, where it often provides diners with an unpleasant surprise. Cleaning out the clams -- a process called purging -- is an important first step in making them edible. If you bought your clams from a supermarket or large fishmonger, they've probably already been purged. If you harvest them yourself, or buy directly from the harvester, you'll need to do it yourself.