Jules Verne in his science fiction, 20,000 Leagues under the Sea, mentions a ship, Nautilus, which could dive beneath the waves and surface again when it wanted to.
Even before submarines were thought about, Verne had created the blueprint of this technological marvel. Not only did he describe the machine, but he also explained, in great detail, how it worked. In fact, today’s submarines use exactly the same technology as Verne’s Nautilus did!
How does a submarine float and dive under water at will?
Try a little experiment. Take an empty mug and turn it upside down. Now try and push the mug inside a bucket full of water. You will have to apply a lot of pressure to do so. But once you release the pressure, the mug simply floats back to the top.
Air is lighter than water
The mug resurfaces because the air trapped inside it makes the mug lighter than water. This makes the mug float. Similarly, a submarine has huge tanks called ballast tanks. The air in them allows the submarine to float.
When a submarine has to dive, the ballast tanks are filled with sea water. This makes the submarine heavy and it sinks.
When the submarine has to resurface, the water is pumped out of the ballast tanks and compressed air is forced in. Once the tanks are filled with air, the submarine becomes light again and begins to float.