From Academic Kids
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. 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 suborder 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.
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.