Until the 20th century, a bullet wound was very dire news for several reasons. Lack of medical technology, techniques, understanding, and the lethality of the bullet itself. The golden age of piracy came decades before empirical scientific medical research, like John Hunter. Most firearms' used .45 or larger calibers that had a comparatively low velocity. This meant a large bullet traveling slow, so it will cause a lot of damage and likely embed itself in the victim. The bullet itself could fracture any bones it came into contact with, which it was likely to hit because of its large size. Being embedded means it likely needs to be removed, carries a higher risk of infection, and may be blocking blood flow. Furthermore, they did not have the germ theory and did not fully understand infection, but they knew a bullet wound would likely "turn the blood bad". On a ship, you could not expect state of the art levels of battlefield medicine, either, unless you were on a the larger ships fleet with a surgeon. Keep in mind their ability to surgically repair anything was limited, especially organs and bones, and infection was a constant threat. Amputations were common in order to separate infection or damaged beyond repair limbs from the body. Infections like tetanus, septicemia, and other bacteria.
It's probably easier to illustrate the process as follows.
Limb shots could be survived with access to a surgeon. Provided blood loss and shock doesn't cause death. If the bullet goes straight through without hitting bone, with cauterizing, it's possible to survive with the limb intact. If infection set in, they would move quickly to amputate. More likely, the bullet will hit and shatter the bone, which to their standards was not repairable. They could set (to a limit) and splint broken bones back then, but bullet wounds tended to cause shattering instead of fracturing. The only hope was to amputate and cauterize/seal the wound and hope the wound doesn't fester. It required a lot of care to properly drain and keep clean, and debridement methods were not well understood.
Superficial torso injuries could also be survived. Keep in mind there's not much area in the body that would go too unharmed. If the bullet passed through, that was better. However, if the bullet embedded or carried debris (shirt, wadding), it needed to be surgically removed. This was possible, but difficult. The bullet itself, the surgeons hands, tools, all carried infection.
If it hit an organ or artery, death by exsanguination would likely follow quickly. Otherwise, slow blood loss and infection would take the victim. The same went for shattered ribs from the bullet. There was simply little they could do beyond removing the bullet, debridement, cauterizing, and stitching the wound.
The verdict is, if the victim doesn't immediately die from the injuries they are probably going to die from infection.
Sources to follow.
Nelson's Navy: The Ships, Men, and Organisation, 1793-1815 (I know this is later, but there weren't that many advances in bullet trauma or germ theory)
War at Sea in the Age of Sail (Smithsonian History of Warfare)