During your journey, whether by going into battle with others or accidentally sailing through jagged rocks, odds are you will need to make emergency repairs to your Ship in order for it not to sink. To do this, you will first need to find where the hull breaches are in your vessel. They are usually found below the decks, and they can cause water to leak straight into your ship. The more breaches, the more water will find its way into your ship, eventually putting your entire lower decks completely Underwater. Thankfully, one of the barrels on your ship will have planks of wood in it, allowing you to repair the holes on your ship with them.
After repairing all of the holes, water will stop leaking into your Ship. From here, you will have to use your bucket item to bail out the water still within your ship. Depending on how bad it is, you may need multiple crew members to help with this before the damage caused becomes irreversible. Continue gathering the water with the bucket, throw all of it off the side of your ship until no water is left.