I think pretty much any battery is going to be unsafe if it gets seawater inside (seawater + sulfuric acid = not good).
That said, I don't recall anyone having that problem since WWII when submariners would occasionally gas themselves.
Three general types of batteries commonly used in boats right now: Lead/Acid wet cell, AGM, and Gel Cell.
Lead/Acid is the normal car battery type: Plates of lead are submerged in a sulfuric acid electrolyte. Inexpensive, reasonably reliable, easily charged. Need to keep fluid level up, they will offgas significantly when charging, are prone to sulfating (shorting between plates) if overly discharged, or left uncharged for long periods.
AGM is similar in construction, but rather than simply having liquid, they have a fiberglas mat between plates. The mats are saturated with the electrolyte compound. More vibration resistant, can be mounted at any angle, sealed so they are maintenance free (though they, too, will offgas to a smaller degree when charging.) More expensive than wetcell, but less maintenance.
Gel Cell's use a thick jelly as an electrolyte. Like the AGM's they are maintenance free, and can be mounted in any orientation. They are more finicky about charging, however, current and voltage must be limited in application to avoid cooking them. As I recall, they are very expensive.
Within the wetcell and AGM line you can find starting or Deep Cycle batteries.
Starting (or cranking) batteries are typical of what's in your car. They typically don't like to be discharged to a high degree (usually it's about 70% or so, as I recall.) They do, however supply a large starting current, which is what you need for starting.
Deep Cycle batteries use thicker plates, and can withstand deep discharges better than starting batteries. They can go to somewhere around 30% capacity up to 100 or so cycles (see manufacturers specs.) Deep Cycles are generally used as "House" batteries; for running lights and entertainment stuff while you're anchored up.
For my boat (18' aluminum RIB; no entertainment system), I have a pair of standard cranking batteries. They have enough reserve to run what I need for my normal uses (biggest worry is running the nav lights at night while I'm diving. Not much draw there, really.) I thought about going with one starting and one deep cycle battery, but the more I use the boat, the more I think it would be overkill.
Or, a websearch for "marine battery primer" should get you more reading material than you would ever want.