the first Pirates of the Caribbean movie (The Curse of the Black Pearl) is set in the early 1700's during the Golden Age of Piracy, and it's about the fallout from Captain Jack Sparrow and Captain Barbossa's fractured romantic relationship ("matelotage" was the legal term for male-male commitments between pirates at the time.)
the focal point of it is "Who gets ownership of the Black Pearl after the breakup" (the ship being the fastest in the Caribbean) and it ultimately culminates in a marooning, the involvement of the British Royal Navy, and Jack shooting Barbossa, ending the latter's reign of terror.
the second movie picks up several years later, focusing on Will Turner's backstory and his quest to find his father---he ends up finding his father on the Flying Dutchman in service to Davy Jones, and Will and Jones end up developing a kind of will-they-won't-they relationship. Will ends up spending an evening in Jones' cabin under the premise of genuinely caring about him, but he ultimately does this to steal the key to Jones' heart, he escapes the ship, and vows to free his father.
while this is happening, Commodore James Norrington and Elizabeth Swann's father, Governor Weatherby Swann, are trying to locate Elizabeth, and they end up finding they have more in common with each other than James and Elizabeth do. they become distracted by one another, and Lord Cutler Beckett ends up leveraging this information (homosexuality was punishable by death, at the time) to take the Governor's position in Port Royal and launch a campaign to find the heart of Davy Jones as well, as it can be used to control the seas and thus control trade.
Elizabeth, who went missing to find Will, makes her way to a "sea witch" named Tia Dalma to divine his location, and she discovers that the witch is actually the trapped soul of Calypso, the goddess of the sea, in mortal form. she vows to find the heart of Davy Jones as penance to Calypso, as the two were once lovers, and also to free Calypso from her human bonds (it is implied that she and Calypso reached this understanding romantically)
but the heart is ultimately found and stolen by Beckett, who then gains control of the seas in the 3rd movie, leaving Will and Elizabeth without the prize. they each return to their respective newfound lovers, and Elizabeth maneuvers her way through pirate politics to be elected pirate king to try and gain the upper hand on Beckett. Will and Jones are stuck under Beckett's control, and the two warring sides (Elizabeth + Calypso + pirate court) (Beckett + Jones + Will) eventually meet at sea for a final battle, in which Elizabeth frees Calypso partway through with a demonstration of true love, and it ends up turning the tide in their favor, allowing pirates to win. Jones ends up dying and being cast into the sea, and Will is left heartbroken, seeking to return to Elizabeth.
Elizabeth is given the choice between a goddess and the man she once loved, and she ends up choosing Will after seeing what loving a deity ultimately did to Jones. Will ends up taking over the Flying Dutchman as an apology to Calypso and since someone has to care for the dead at sea, and Elizabeth maintains her position as pirate king, thus closing the 3rd and final movie in the Pirates of the Caribbean franchise.