Hermit crabs are marine or terrestrial invertebrates called decapods that mostly live underwater, with a few tropical species living on the land. They are named for their habit of living in scavenged shells, which they must replace regularly to accommodate their growing bodies. Hermit crabs are scavengers that subsist on a variety of organic material.
Hermit crabs are very vulnerable when not protected by their shells. The crab's abdomen is not symmetrical and, in most species, the tail curls up on the right side of the body. Hermit crabs cling to their shells tenaciously, and pet hermit crabs may be killed if they are forced from their shells. Hermit crabs retract into their shells when faced with a predator. Many species block the entrance to the shells with their claws.
Hermit crabs are relatively social by invertebrate standards. They often live in loose colonies along a patch of beach or mangrove swamp. When large crabs discard their shells, slightly smaller crabs are often lurking close-by in order to snatch the abandoned shells. Occasionally, hermit crabs fight for quality shells, and in some cases, small aggregations occur around crabs with particularly noteworthy shells. Some of the largest species routinely carry anemones, barnacles and other organisms on their shells.