Submarines use ballast tanks to control their buoyancy. By adjusting the amount of water in these tanks, the submarine can either submerge or surface. When the tanks are filled with water, the submarine becomes heavier than the water it displaces, causing it to descend. Conversely, expelling water from the tanks allows the vessel to rise to the surface.