In conversation between him and Elizabeth, Captain Barbossa says these words,
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.
But
Pintel (with Ragetti):
Never sat well with Bootstrap, what we did to Jack Sparrow. The mutiny and all. He said it wasn't right with the Code. That's why he sent off a piece of the treasure to you, as it were. He said we deserved to be cursed...and remain cursed.
Who actually cursed the coins? Bootstrap or the heathen gods?
If it's bootstrap, how did he do it? he was just a mortal human back then.