Shipwrights

Shipwrights are located mainly on the spawn islands, though they can be found on other islands as well. They can repair your ship for a hefty amount of money, considering the damage the ship has taken. It takes a couple of seconds for the ship to regain all of It's lost HP, so be aware if you have any bounty since if the ship is attacked while It's healing, the healing will stop and you'll have to start all over again.

Many people consider despawning your ship to be a more cost-effective method.