The locket is a golden scallop engraved with her name, and a chain wrapped around the tail end, making for a makeshift necklace. When it is opened, the locket will project an image of Atlantica with little merfolk swimming about while playing a variation of the song, "Down to the Sea".
During Melody's presentation ceremony, King Triton came to give Melody the locket as a gift, representing her connection to both worlds. But before she could given the present, the party is interrupted by Morgana. After a few close calls, Ariel decides that Melody must never know about her heritage in order to be protected from Morgana. King Triton begrudgingly agrees and drops the locket into the ocean floor.
For the next twelve years, the locket remained under the reef near Eric's castle, half buried in sand, and undisturbed until the day Melody rediscovered it while swimming for seashells.
After a disastrous birthday party is crashed by Sebastian, Melody hides up in her room and gives the locket a closer inspection, discovering that her name is written on it. She then runs away from home to understand the meaning of the locket, and the answers to her true heritage.
Later in the film, she loses the locket while trying to steal the trident from her grandfather's palace. Ariel takes the locket, realizing that Melody must have taken the trident, and rushes after her. Eventually Melody gets the locket back by the end of the film.