These unusual types of crabs live in Davy Jones' Locker. They were camouflaged as rocks until their bodies emerged as crustaceans holding their legs and claws on their bodies. After the first crab that Jack Sparrow threw far away from him came to life, a large group of crabs came to life under command of Tia Dalma and brought the Black Pearl from its resting place from the sands of the Locker to the ocean so Jack can reunite with his crew. It is later shown that the crabs were revealed to be part of Tia Dalma as many of them were approaching her as it is revealed that she was the one who helped Jack escape from Davy Jones' Locker.
After Jack Sparrow ends up inside Davy Jones' Locker and interacts with a "rock", it suddenly emerges as a living crab, which Jack comments about the unusual creature inside the Locker. Soon as Jack attempts to pull the Black Pearl by himself, he stares at the crab looking at him, planning to help Jack get the Pearl out of Davy Jones' Locker. The first crab that came to life commands the other crabs to lift the Pearl and help Jack get out of Davy Jones' Locker while Jack notices the crabs pulling the Pearl and seeing his ship going past by, Jack catches up with it as it is revealed that Tia Dalma was the one who helped Jack and the Pearl get out of the sand thanks to the help of her crabs just as Jack himself manages to reunite with the rest of his crew who recognizes that Jack is alive all along. Jack and his crew manage to escape from Davy Jones' Locker.
Later while preparing for a battle against Davy Jones and the EITC, the crew of the Pearl and the Brethren Court members plan to release Calypso; after burning all the Pieces of Eight, Barbossa asks Calypso to "unleash his fury upon those who dared pretend themselves her master or his," she shouts in French "Across all the seas, finds the path to he who wrongfully entombed me!" and then disintegrates into a swarm of crabs that scuttle overboard, flooding the Pearl as well as frightening the crew noticing the avalanche of crabs where many of them return to the ocean, much to Barbossa's worry that Calypso was no help; afterwards, Elizabeth Swann leads the crew to hoist the colors to begin a battle against Davy Jones' crew, resulting in a maelstrom to occur where a violent battle at the maelstrom begins. However, the battle ends after Davy Jones falls to his death, causing the seas to become calm once again after the battle ended.
The scene where the fake rocks are revealed to be crabs was filmed in the Bonneville Salt Flats where real rocks were placed on the flat area before the CGI effect was provided on the "rocks" which were later revealed to be crabs using the reference footage that was filmed in Utah[1]. This Easter egg featurette can be found in the Blu-ray releases of Pirates of the Caribbean: At World's End as well as its 2-Disc Limited Edition[2].