Before you even cook crab, you should pick the right one. Shellfish should be bought as fresh as possible for best results. To ensure the crab is fresh, buy it live. It sound scary, but this is the only way you can ensure the crab was caught recently and greatly reduces off-tastes or foodborne illnesses.
Once your crab is bought and primed for cooking, bring a large pot (large enough for all your crabs) to a rolling boil over very high heat. Then is the scary part. Dunk the crabs headfirst into the boiling water and cover with a lid. Let cook for 15-20 minutes depending on the size of your crabs. Rinse briefly with cold water and then they're ready to serve.