Tia Dalma is actually Calypso, goddess of the seas, trapped in human form by the Pirate Lords of the world. In a last attempt to defeat the British (and Davy Jones' Flying Dutchman, which the British Control), the Pirate Lords decide to release Calypso in hopes that she will be merciful and help the Pirates from the British attempt at extincting all of them. When she is finally released, she becomes one with the seas again, and clouds form along with a whirlpool.
In the midst of the battle, Jack Sparrow and Davy Jones fight to the death for Davy Jones' heart. Also, Barbossa marries Elizabeth and Will in the middle of the fight, but after is stabbed by Davy Jones (having been separated from Jack while they were fighting) in the heart. Jack then stabs Davy Jones' beating heart, leaving Will to be the one to take place as captain of the Flying Dutchman.
For one final battle, the Black Pearl is in target of Lord Beckett's ship, with Beckett readying the cannons (thinking betraying promises of freedom to Jack "good business") and The Black Pearl doing the same under Jack's orders. When Beckett's ship has the advantage, the Flying Dutchman, now under Will's command, arises from the sea on the other side of Beckett's ship, and the Flying Dutchman and Black Pearl fire on both sides of Beckett's ship. Lord Beckett, dumbfounded, makes no responses as the ship his hopelessly ripped apart from cannons, Beckett dying along with it.
Before Will must have his 10 years at sea since he is now the FlyingDutchman's captain, he is allowed to have one day with his love,Elizabeth. They kiss and Will gives Elizabeth his heart, asking her to keep itsafe for another 10 years until they can see each other again. The oldcrew of the Flying Dutchman is also returned to human form and life.
At the end, it is seen that the Black Pearl abandoned Jack and Gibbs (with Barbossa taking position of captain), but Jack stole the navigation charts used throughout the movie to find just about everything. In a little dingy boat, Jack alone looks at the map confused, taking a swig of rum, and then searches his way to find the Fountain of Youth alone in the seas.
After the credits...
It's 10 years later, and we see Elizabeth and a little boy run towards a cliff to look over the sea of where Elizabeth and Will last met. There is a flash of green in front of Elizabeth's eyes and then the scene ends.