I watched Das Boot recently, and couldn't help noticing how often rather significant amounts of seawater wound up getting into the sub. Anyone who has seen the movie knows what I'm referring to here. Any time they surface and go above decks there's a shot of what must be tens of gallons of water getting into the boat. And of course the captain and others get VERY wet.
How did they deal with this? Was everything just a little bit damp all the time? How did they dry out if not? Apart from occasional surfacing, this is a mostly closed/sealed vessel, and there just doesn't seem to be anywhere for the water, moisture, and humidity to go.
I'd appreciate details of how this changed over time, if that's possible.
Submarines, as with most other ships, had/have bilge spaces below decks. Seawater that came in through something like the conning tower hatch would drain into the bilge system, and then be pumped overboard by the bilge pumps. This same system also handled the natural slow leaks that are present on any ship. World War II submarines were smelly, damp, and foul places, but there were systems in place to control flooding and keep the submarine operational.
Any electronics in the vessel would be situated a bit above the floor so that they did not become directly exposed to water, or else they would be heavily waterproofed. Water entering unwanted spaces could be a real danger; if the engine/battery rooms flooded, the batteries could react with the conductive sea water and produce lethal chlorine gas, which would force the submarine to surface and vent.
Another interesting tidbit is that part of the standard "silent running" routine was to turn off the noisy bilge pumps, which meant that over prolonged periods of silent running the submarine would gradually become heavier, especially at deeper depths and higher pressures.
If you're interested in how U-Boats operated, I'd really highly recommend Das Boot the book. The author goes into a lot of details concerning the physics, and the mechanical workings of the submersible that I found fascinating.