Submarines are designed to control their buoyancy to sink and float as needed. Submarines have ballast tanks that can be filled with water to make the submarine heavier and cause it to sink. Conversely, the ballast tanks can be emptied of water and filled with air, which makes the submarine lighter and allows it to float back to the surface. By adjusting the amount of water and air in the ballast tanks, submarines can control their depth underwater.