How does the submarine go up and down?
The above is absolutely true, but once underwater it is possible for a submarine to vary its depth without changing its buoyancy by adjusting its planes as it moves forward, as an airplane does with its control surfaces. In World War 2, the Germans had a midget submarine (the Seehund) capable of diving without flooding its ballast tanks. The pilot merely increased the engine to full power and turned the planes down, and the sub was underwater in three to five seconds. A full-sized submarine takes the better part of a minute to flood its ballast tanks and submerge.