Crabs are usually boiled whole. Often just the legs are served, along with the portion attached to the leg and the claws. In landlocked areas, often the only way to obtain crab is those previously caught and frozen. Frozen Snow, King, and Jumbo crabs generally retain flavor fairly well. They are usually frozen right after cooking and then shipped frozen.
To prepare previously killed and cooked crab, it only has to be reheated, so it can either be steamed or baked. If a sufficiently large steaming basket is available, place the crab inside and steam for about 10 minutes until heated through. It is commonly served with melted butter which can be clarified first and with lemon optional.
Live crab is fresher and tastier, however. If preparing live crab, you will find two main schools of thought: those who put the live animal into a pot of boiling water and those who, finding this inhumane, kill the crab just prior to preparation. To kill the crab before boiling, the usual method is to flip the crab onto its back and lift up the apron (the triangular flap pointing towards the head). You will notice a small hole. Drive a sharp screwdriver or slender knife quickly through the hole. Do not be shy: you want this to be a strong thrust that reaches to (though not through) the shell on the other side. Prepare immediately afterward.
Whether live or freshly killed, the crab should go into a large pot full of heavily salted boiling water. Extra seasoning isn't required, but adding a spice mix such as Old Bay can add tremendous flavor to the final result. Putting the crabs in will lower the water's temperature, so cover the pot and bring the water back to a boil. Then reduce to a simmer and cook for 12-15 minutes for crabs under three pounds, 15-20 for larger crabs.
Once done, remove the crab and rinse with cool water to stop the cooking process. Next remove the apron; once it has been removed, stick your thumb through the hole left behind and lift up to remove the outer shell. Pull off the gills (the feathery grey ring) and decide whether you wish to keep the brownish insides. They are called tomalley and are the crab's guts, if you will. Tomalley is edible (and considered a delicacy to some), so scoop it out and serve alongside the crab if you like. But you can also simply rinse it out under running water if you prefer.
At this point, all that is left is to crack open the crab, extract the meat, and enjoy.