Captain Jack Sparrow stole a crown from Isla de Muerta and wasn't cursed. If he was immortal why did Will have to save him when they try to hang Captain Jack for his crimes? Why isn't he cursed when he stole that crown?
I assume that you're asking about the final scenes on the island, when Jack is rummaging through the riches in the island's cave (providing a very unromantic setting for Will's and Elizabeth's conversation)
The answer to your question is that not all the items in that cave bring you the curse. Only the coins do, as explained to Elizabeth by captain Barbossa:
You don't know what this is, do you?
It's a pirate medallion. This is Aztec gold. One of 882 identical pieces they delivered in a stone chest to Cortes himself. Blood money paid to stem the slaughter he wreaked upon them with his armies.
But the greed of Cortes was insatiable. So, the heathen gods placed upon the gold a terrible curse. Any mortal that removes but a single piece from that stone chest shall be punished for eternity.
To finish the answer: He stole the crown but he didn't keep the crown. At the end of the fight with Barbossa, while Barbossa is distracted looking at Will, Jack uses his sword to cut his own hand, spilling blood on the crown, then tosses the crown to Will, who drops it (and the one on the chain) back into the chest. At that point, the curse lifts. So when the hanging attempt occurs, Jack is mortal again.