How
Submarines Work - Diving/Surfacing
When a boat is on the surface, it has to be supported on a cushion of air. The air is held in big ballast tanks attached to the outside of the pressure hull which is the body of the submarine.
The main ballast tanks have large holes at the bottom which are always open. There are also a number of smaller holes at the top which can be opened and shut by plugs called main vents. When the main vents are opened, air rushes out of the holes at the top, and water floods into the tanks through the holes at the bottom. The submarine then loses it's buoyancy and starts to submerge or dive. Of course no water enters the pressure hull. When the captain wants to surface, the main vents are shut and compressed air is blown into the ballast tanks, forcing the water out through the holes in the bottom. The submarine becomes buoyant and rises to the surface again.
A submarine has a propeller and a rudder like a normal ship, but it also has hydroplanes (like fish fins) on the side of the submarine which steer the boat up and down when submerged, or enable it to stay at the depth the captain orders. Naturally, the hydroplanes only have an effect when the submarine is moving through the water.