A Cartesian diver
Press and hold the lever. Watch the diver, which is partly filled with water, and partly with air. Change the pressure. Note how the volume of air in the diver has changed. Try to make the diver motionless in the middle of the tube length.
How it works
Two forces act on the diver: gravity in the downward direction and buoyancy upwards. The resultant of between those forces (that is the difference of their values) determines the diver’s movement. If the diver’s average density is lower then the density of the liquid, buoyancy dominates and keeps the diver at the top (Archimedes’ law). When you press the lever, you increase the pressure in the whole tube (Pascal’s law); that compresses the air in the diver and lets more liquid in which makes the diver heavier. Gravity, now stronger than buoyancy drowns the diver. When you release the lever, you see the opposite effect.
Legend has it that Archimedes (a Greek scholar from 3rd century BC) discovered the law named after him while taking a bath. Overjoyed, he ran around the streets of Syracuse naked, shouting
“Eureka!” (“I have found it!”).
Submarines dive and surface by lowering or increasing the air volume in their pressurised ballast tanks.