I don’t know if you’d be shocked, necessarily, but yes, submarines do leak. So do most steel hulled ships, and in fact, it’s an accepted truism that any large hull will leak somewhat. Back when steel hulls were of riveted construction, leaks were commonplace as the hull flexed with physical and thermal stresses. Modern metal hulls are almost always steam welded (to prevent cell corrosion and flexural stresses on the weld) and the joints are typically lapped or doubled, so leakage through joints is minimal, but there will eventually be leakage through hull fittings (thrusters, shaft seals) and even, on large hulls, small cracks which are not a structural threat.
Submarines, by their nature, are under greater pressure, see high thermal stresses and operating loads, and have a significant amount of through-hull fittings and aperatures (periscopes and antennae, loading and torpedo hatches, sensors, et cetera). Wherever there is the slightest flaw, water will leak in, one drop at a time. Since leaks large enough to pose an integrity threat are immediately evident (spraying it at hundreds of psi), it’s not really an issue, and Naval subs are routinely inspected and refit between cruises. All modern submarines are made of high tensile strength steel save for a few Soviet attack boats with titanium hulls permitting them to dive more deeply than similar size subs with steel hulls.
Because the air humidity in a modern nuclear sub is tightly controlled (to prevent corrosion and protect electronics) most leakage will evaporate on its own, and just a small amount will make its way into a bilge. Older, WWII-era subs used to leak constantly, though, but that was the least of the worries and discomfort of the captain and crew who were plowing mostly blindly through the water (without detailed charts or modern navigational aids) in a filthy, diesel-fume and rotting-potato filled clastrophobic tube not much bigger than a tour bus. See Wolfgang Petersen’s Das Boot for an accurate portrayal of what it was like to live on a WWII-era sub.
Aluminum is also commonly used for small-to-midsized boats, though its high thermal expansion and relatively low shear modulus and tensile strength (in marine-suitable corrosion resistant alloys) make it unsuited for large vessels or those that operate in arctic environments. Corrosion resistance (for steel hulls) is provided by sacrifical anodes (called “zincs”, as they’re made of zinc or zinc-copper alloy) which are more electronegative than the steel, and by copper plating or copper-based bottom paint. A properly built and maintained steel or aluminum hull will outlive then engine, the superstructure, and probably the owner, as well as survive many groundings and collisions.
Fiberglass is most typically used for sailing yachts, despite the fact that it’s not really an ideal material for boats. It does have numerous advantages–it does not suffer from chemical corrosion, it’s cheap to build and (fairly) easy to patch, the surface can be polished and waxed for smoothness or roughened to take paint, you can make just about any shape you desire, et cetera. On the other hand, fiberglass requires regular maintainence to keep it waxed and sealed; it suffers from continuous fatigue due to microfractures and if not layed properly can debond and come apart; it has the lowest toughness/damage resistance of any standard hull material (one solid grounding and a hull requires major repair) and low flexural modulus forcing hulls to be thick and surprisingly heavy, and will eventually take on water no matter how well cared for. Some older matrix formulations were also very sensitive to UV light, though modern epoxies are far more resistant. Oh, and it’s nasty, itchy stuff to work with. However, it’s cheap, it’s light, and for most recreational hulls, which will be used only occasionally and in conditions that aren’t regularly extreme, it’s fine. Most recreational boats seem to end up in permenant storage or washed up in the shoals at some point anyway.
Wood hulls, and particularly those made of teak and/or ironwood, are, if properly maintained, surprisingly watertight. If the hull is built correctly (accounting for the swelling of the wood when it is wetted) the hull will be self-sealing, and indeed, the majority of leakage in a well built completely wood vessel is through the deck, not the hull. A poorly built hull, in which the dry seams are too tight, will tend to warp, allowing leaks; so will plywood hulls when the (inevitably) start to delaminate. One expects wood to rot in a wet environment, but the salt water actually tends to preserve the wood, and if properly cared for (i.e. sealed or painted, not allowed to dry and crack in the sun, damage repaired promptly) a wood hull may be more watertight and last longer than metal. It also provides a fair amount of insulation and (generally) positive flotation, something metal hulls do not do. Wood does require a lot of maintainence, which is prohibitive for recreational owners, and it isn’t great at resisting contusions (though still better than fiberglass), but its biggest problem is that it requires skilled craftsmen to work a hull from wood, and the hull shapes are somewhat limited by the size of stock material and mechanical limitations of wood.
One other material people aren’t generally aware of as a hull material is ferro-concrete. That’s right; some people sail cement boats. In his amusing travellogue/journey of self-discovery The Water In Between, Kevin Patterson purchased and sailed (if inexpertly and haphazardly) a ferro-concrete yacht, Sea Mouse, from Washington to (eventually) Tahiti and back. He doesn’t seem to have had any leakage problems despite the very questionable maintainence of the boat, and indeed, ferro-concrete is, or at least was, more often used in large shipping vessels; the Liberty Ships that were operated by the Merchant Marine corps during WWII were made of ferro-concrete, and despite the low fracture toughness and tensile strength of the material they were surprisingly resistant to damage, owing to the thick hull which tends to spall when struck by a torpedo rather than through-fracture. It was also quite cheap to cast a hull and required little skill to fabricate. Most of these ships were deliberately sunk after WWII as target practice, but a couple that remain still demonstrate watertight integrity.
So, it’s generally taken for granted that all large hulls will leak, whether through seams, cracks, through-hull fittings, or at least, though the deck; hence, all boats have bilge pumps.
It’s not the definitive reference on hull-building, but Dave Gerr’s The Nature of Boats provides a pretty comprehensive introduction to monohull design and outfitting of sail and motor yachts. Introduction to Naval Architecture is a general survey and a standard reference of large shipbuilding.