Hermit crabs use empty shells of snails as shelter, to protect their body. As the crab grows bigger, it leaves the existing shell and finds a bigger shell. There is usually high competition, they fight with other crabs for suitable shells.
They have been observed forming a vacancy chain to exchange shells.When an individual crab finds a new empty shell it will leave its own shell and inspect the vacant shell for size. If the shell is found to be too large, the crab goes back to its own shell and then waits by the vacant shell for up to 8 hours. As new crabs arrive they also inspect the shell and, if it is too big, wait with the others, forming a group of up to 20 individuals, holding onto each other in a line from the largest to the smallest crab. As soon as a crab arrives that is the right size for the vacant shell and claims it, leaving its old shell vacant, then all the crabs in the queue swiftly exchange shells in sequence, each one moving up to the next size.