By their pumps and ballast-tanks: allowing water into the tanks to raise the vessel's density so can submerge, or pumping air into the tanks to displace the water and allow the submarine to surface.
Ballast tank
Allowing water into, or discharging it to replace by air, ballast-tanks built into the hull.
the overall density goes up.
The density will rise and submerge the submarine.
Control room, submarines
Modern subs have climate control
Submarines have ballast tanks in them.........when it has to go deep down, the ballast tanks are filled with water, which increases its average density in regard to water(Relative Density).....and when it has to come up to the surface it empties the ballast tanks...and it rises. That's it.
Man applies the concept of density in many ways. One way is by designing ships and submarines that will float on water. If the density of the object is less than the water's density, the object will float, but if its density is less than the density of water, it will sink.
Remote control submarines are being built by Shenzhen Oida Electronics and Gemini Ind Ltd in China. They are also manufactured in kit form by Alexander Engel KG of Germany.
It doesn't pump air out; it forces water out of its ballast tanks to increase its buoyancy.
Submarines are designed with enough ballast and control systems to allow them to submerge and surface as needed.Surface ships are designed only with enough ballast and control systems to keep them on the surface. While they can sink just as well as submarines can, their ability to re-surface without a salvage operation is non-existent.
The density of any substance is constant, we don't control it. However, by finding the density of any substance, it can be used to help identify the substance.