All arthropods need to molt. Here is a time lapse video of how a spider crab does it.
When a crab is ready to molt it rapidly takes up water, causing pressure to build in its body cavities. The rigid outer exoskeleton breaks open and the crab is able to push itself out from inside its molt. The new exoskeleton is softer, so it is undamaged by the increase in body volume, but it will eventually harden over time. Recently molted, soft-shell blue crabs are commonly steamed and eaten whole in my neck of the woods.