In a nutshell, type 316 is more resistant to corrosion from salt water, making it the best material for use on and near the ocean.
Stainless steel is an alloy that contains at least 50% iron and 10% chromium. The chromium inhibits corrosion and thus plays a part in defining stainless steel. The more chromium, the more corrosion-resistance. But chromium is not the only factor in corrosion resistance. Many other elements are added to enhance the properties of a particular grade and type of stainless steel.
Stainless steel alloys are grouped according to the structure of their crystals. Adding nickel creates the structure used in marine applications, called austenitic. Austenitic stainless steels are identified by their 300-series designation. Most of the stainless produced today is type 304, a low-carbon variation which is also called 18-8, because it's made of 18% chromium and 8% nickel. Type 304 has good resistance to corrosion by a great number of chemicals. Consequently, it satisfies a broad demand for adequate performance at an affordable price. But there are a number of marine applications where 304 and other 300-series types are inadequate.
By adding more nickel and 2% molybdenum to 304 stainless, you get type 316, which has the best corrosion resistance among standard stainless steels. It resists pitting and corrosion by most chemicals, and is particularly resistant to salt water corrosion.