The Little Mermaid lived in an underwater kingdom with her father the sea king, her grandmother and her five older sisters. When a mermaid turned fifteen they were allowed to visit the surface, and as she heard her sisters’ stories of the world above, she longed to be able to go there herself. On her fifteenth birthday she did so, saw a ship carrying a handsome prince and immediately fell in love with him. When a storm hit, she saved him from drowning and delivered him safely to a temple, waiting unseen until a girl from the temple found him.
Longing both for the prince and an eternal soul, the Little Mermaid visited the Sea Witch, who gave her legs in exchange for her voice, and to get it, the witch cut out her tongue. She gets her legs, however she cannot walk without feeling stabbing pains in the soles of her feet, as though she is walking on swords. Furthermore, she’ll only get a soul if the prince falls in love with her and marries her. If he marries anybody else, she’ll dissolve into seafoam and die soulless.
The prince is initially attracted to her, and loves to watch her dance (presumably not knowing how much pain it causes her to do so). Unfortunately, he’s betrothed to another princess. But he says he’ll refuse to marry her, because he does not love her - indeed, he cannot love anybody except the girl who rescued him from drowning.
But what do you know, his betrothed turns out to be that very girl from the temple who found him on the shore - the girl he thinks saved his life.
The prince and princess marry and the Little Mermaid’s heart breaks. However, her sisters have made another deal with the Sea Witch - they’ve sold their hair to her in exchange for a knife. If the Little Mermaid kills the prince with the knife and lets the blood drip on her feet, she will become a mermaid again and will live out a full life.
But she can’t do it. She can’t bring herself to kill the man she loves. Instead, she throws herself into the sea and dissolves into seafoam - but instead of ceasing to exist, she becomes a spirit, a daughter of the air, because she strove so hard to gain an eternal soul. By doing good deeds, she now has the chance to attain that soul and eventually rise to heaven.