The Locker was used by Davey Jones to relegate souls that either refused to join his crew or Jones himself deemed unfit to serve aboard the Flying Dutchman. The interior of the Locker represented a soul’s worst fear, so its appearance was believed to be perceived differently by everyone who entered it.
For Jack Sparrow, the Locker was a vast expanse of hot sand, on which he and his ship, the Black Pearl, were marooned with no hope of reaching the sea. Here, Jack was confronted by physical manifestations of the various aspects of his persona, created to send him mad over time. This punishment played on Sparrow’s love of the sea (in that he equated it with freedom), along with his pride in being “the one and only” Captain Jack Sparrow.
Sparrow was one of the few to ever escape from the Locker, with the help of his former crew, under the guidance of Hector Barbossa. Black Bart was another to escape, as was Jocard with Sparrow’s assistance.
Isla Sirena was said to reside in the Locker, though it could also appear in the real world, presumably when the Sirens were attempting to lure sailors to their doom. Jack Sparrow was one of the few to visit the cave of the mermaids beneath the island, many years before he would visit the Locker itself—though during Sparrow’s visit Isla Sirena was visible in the world of the living.