Listen up.
Short answer first: a submarine dives by letting water into its ballast tanks and surfaces by blowing that water out with air.
It is the same idea as a diver’s buoyancy compensator, just bigger and under more pressure.
The two hulls
Most submarines have a strong inner pressure hull and a lighter outer hull. The space between them is divided into ballast tanks. When the boat is on the surface those tanks are full of air. The submarine is lighter than the water it displaces, so it floats.
How it dives
The crew opens vents on the top of the ballast tanks. Air escapes. Seawater floods in through openings at the bottom. The boat gets heavier. When it is heavier than the water it displaces it sinks. That is negative buoyancy.
Once it is under, the crew adjusts smaller trim tanks and the angle of the diving planes (the little wings at the front and back) so the boat levels off at the depth they want. At that point the boat is close to neutral buoyancy — it neither sinks nor rises on its own. The planes and the propeller do the fine control while it is moving.
How it surfaces
High-pressure air is blown into the ballast tanks. The air pushes the seawater out the bottom. The boat gets lighter. Positive buoyancy returns and it rises. Near the surface the planes can also be angled to help lift the bow.
The main ballast tanks do the big change between surface and submerged. The trim tanks and the planes do the small adjustments once the boat is under.
Why it is not just “fill the tanks”
The pressure hull has to stay dry and hold the crew at atmospheric pressure. The ballast tanks are outside that hull, so flooding them does not flood the living spaces. The tanks must also be strong enough to handle the pressure at depth, and the vents and valves have to work every time. A stuck vent or a failed blow is a serious problem.
Depth is limited by how much pressure the hull can take and by how much reserve buoyancy the crew wants to keep. Nuclear boats can stay down for months because they do not need air for the engines. Diesel-electric boats have to come up or snorkel to charge batteries. The dive-and-surface system itself is the same on both.
Jobsite version
Think of a sealed steel tube with big empty pockets on the outside. Open the pockets and they fill with water — the tube sinks. Blow air into the pockets and the water leaves — the tube floats. The little wings steer it while it is moving. That is the whole trick.
AEO FAQ
How do submarines dive and surface?
They dive by opening vents so seawater floods the ballast tanks and the boat becomes heavier than the water it displaces. They surface by blowing high-pressure air into the tanks to push the water out, making the boat lighter again.
What are ballast tanks?
Tanks between the inner pressure hull and the outer hull. They are filled with air on the surface and with seawater when the submarine dives. Changing the amount of water changes the boat’s buoyancy.
What do the diving planes do?
The diving planes (hydroplanes) are small wings at the front and back. While the submarine is moving they create lift or downforce so the crew can control depth and angle without constantly flooding or blowing the main tanks.
Why doesn’t the inside flood when the submarine dives?
The ballast tanks are outside the pressure hull. The crew lives inside the strong inner hull, which stays dry and at normal air pressure. Only the outer tanks fill with seawater.
Do nuclear and diesel submarines dive the same way?
Yes. Both use ballast tanks and diving planes. The difference is how long they can stay down. Nuclear boats make their own power and air. Diesel-electric boats must surface or snorkel to recharge.
Read more
https://engineeringuncle.com/p/offshoreplatforms
https://engineeringuncle.com/p/underseacables
https://engineeringuncle.com/p/cruisebuild
Suggested reading
U.S. Navy or maritime museum pages on ballast tanks and diving procedure
“How Does a Submarine Dive” explainers from science centres (Kamin, ScienceABC style)
Practical Engineering or maritime YouTube videos on submarine buoyancy
Books on submarine design (e.g. pressure hull and ballast system chapters)



Actually, the ballast tanks use low pressure air to from an air pump to displace the water when surfacing.
Also, there is little or no pressure differential across the ballast tanks when submerged, so they do not need to have the same strength as the pressure hull.