Durability is a system created to make each ship's existence finite (like "lives" in a video game). You lose one durability point each time your ship is sunk or successfully boarded by an enemy. If this occurs when your ship has only one durability point, it is lost forever. Only the actual sinking or capture during missions, random fights, or PvP is counted. If you fail a mission, but your ship is intact, no durability points are lost.
Bigger ships have fewer durability points than smaller ships. This is to make them more valuable. Captains will think twice before bringing a bigger, more expensive ship into battle.
In order to refill durability, you need to have one or more ship deeds of the exact same type in your possession. Visit the dockmaster, switch to the ship whose durability you want to refill, and select "refill durability." Each deed will add the number of durability points that the deed lists in mouse-over detail.