You may not know this, but boat insurance is the oldest type of insurance. Since the 17th century, people have been insuring their boats, and over time, a number of standards have developed. Chances are, though, that you know a lot more about car insurance, so the good news is that boat insurance is very similar to car insurance.
You can basically get insurance against three things: damage to your boat or its cargo, sinking of your boat, and hitting another boat. Even though few countries require you to have insurance for your boat (considering how many boats sail in international waters), you should at least get third-party insurance in case you hit a boat that is much more expensive than yours. If your boat isn't very valuable, you probably don't need to insure it against total loss. This is mostly useful for large ships, especially those carrying valuable cargo.
As with car insurance, boat insurance policies come with an excess, which is a large amount of money, to discourage small claims. This is because the insurance is meant to cover big losses, not just small ones like scratches and dents.
You can also buy boat-specific insurance, but it's unlikely you'll ever need it. If you get Increased Value insurance, your policy will pay out the market value of your boat if it is worth more than what you insured it for. This is only useful if you think the value of your boat will go up. Lastly, you might want to get war risk insurance if you plan to sail into a war zone. You might also want to see a doctor about your head, if you know what I mean.