In the POTC movie universe, we only know that Davy Jones raised The Black Pearl from the depth of the sea. There was a deal between Davy Jones and Jack Sparrow that Jack will be captain of The Black Pearl for 13 years.
A transcript of POTC: Dead Man's Chest, when Bill visits Jack to warn him,
Bill Turner: You made a deal with him too, Jack. He raised the Pearl from the depths for you. 13 years, you've been her captain.
Jack Sparrow: Technically...
Bill Turner: Jack. You won't be able to talk yourself out of this.
When Davy Jones boards on Black Pearl after Jack sends Will on the broken ship,
DAVY JONES: You have a debt to pay. You've been captain of the Black Pearl for thirteen years. That was our agreement.
JACK SPARROW: Technically, I was only captain for two years, then I was viciously mutinied upon.
In POTC universe, as explained on this page, Black Pearl was originally named as Wicked Wench and was destroyed by Cutler Beckett. That's when Jack made a deal with Davy Jones. Though the ship was raised from the depth of sea by Davy Jones, it was redesigned by Jack.
The Wicked Wench turned into an inferno, then sank, taking Jack with her. But, while dying, the resourceful Sparrow called upon Davy Jones, and struck a bargain with him...his soul and one hundred years serving aboard the Flying Dutchman in return for a continued human existence of thirteen years as captain, plus saving the Wicked Wench and transforming her into the fastest, most dangerous pirate ship sailing the seven seas. Jack christened his resurrected Wench, now a black vessel with an angel figurehead, The Black Pearl.