How do Submarines dive and surface?

Submarines dive and resurface using the principle of buoyancy. A submarine has two walls of strong steel. For diving underwater, water — the ballast — is pumped into the empty space between the two walls. This effectively increases the weight of the submarine and the ship sinks. For resurfacing, the water is pumped out and air is pumped in. This reduces the weight and tile ship resurfaces.