The term crab is often applied to several different groups of short (nose to tail) decapods with thick exoskeletons, but only members of the Brachyura are true crabs; other taxa, such as hermit crabs, porcelain crabs, king crabs, and horseshoe crabs are, despite superficial similarities, not crabs at all. more...
Hermit crabs, king crabs and porcelain crabs belong to the Anomala and can be distinguished from true crabs by counting the legs - in Anomala, the last pair of pereiopods (walking legs) is hidden inside the carapace and so only four pairs are visible (counting the claws), whereas uninjured true crabs always have five visible pairs.
True crabs are crustaceans in the infraorder Brachyura, in the order Decapoda. They have five pairs of walking legs (the first of which is modified into a pair of claws or chelae) and typically a flattened shell. In all but a few crabs (for example, Raninoida), the abdomen is folded under the cephalothorax. The form of the abdomen usually reveals the sex of the crab - males have a narrow abdomen, while females have a much wider abdomen, under which they carry their eggs. Crabs are a very diverse group, mostly found in salt water, but with some groups living in freshwater or on land. Although famed for their tendency to walk sideways, crabs are in fact able to walk in any direction. Classification within the crabs is traditionally based on the position of the gonopores: whether they are found on the legs or on the thorax. In the two "primitive" sections (sometimes called collectively the "Podotremata"), the gonopores are found on the legs (as in all other decapods); in the Heterotremata, the male gonopores are on the legs, and the female gonopores are on the sternum; in the Thoracotremata, the gonopores are on the sternum in both males and females.
Most crabs show clear sexual dimorphism and so can be easily sexed. The abdomen, which is held recurved under the thorax, is narrow in males. In females, however, the abdomen is considerably wider, and retains a greater number of pleopods. This relates to the carrying of the fertilised eggs by the female crabs (as seen in all pleocyemates). In those species in which no such dimorphism is found, the position of the gonopores must be used instead. In females, these are on the third pereiopod, or nearby on the sternum in higher crabs; in males, the gonopores are at the base of the fifth pereiopods or, in higher crabs, on the sternum nearby.
A number of animals with a similar shape are commonly called crabs, including the crab louse (an insect) and the horseshoe crab (in the class Merostomata). The crab louse is the origin of the slang term "crabs" for an infestation of pubic lice.
Read more at Wikipedia.org