Have you ever tried to swim down to the floor of a swimming pool? It could be a difficult task to do so because the water is trying to push you upward. This upward force is called "Buoyant force". The submarine can submerge because the weight of the ship is heavier than buoyant force. By controlling the air, our submarine can float and sink as much as you like.
In order to control buoyancy, the submarine relies on special tanks that can be filled with water or air. To return to the surface, the tanks are filled with air. This makes the submarine less dense than the water around it, causing the sub to float to the surface.
![](https://i.ytimg.com/vi/iKr-J09Qa44/maxresdefault.jpg)