What happens to water that gets into the submarine without a leak?

We're currently watching the movie "Das Boot" and the men are constantly standing on the bridge, and masses of water are pouring into the boat. Now we're wondering what happens to the water. You can't really drain it because the boat is in the water. Maybe the question is really stupid but we just can't…