funny, actually, i'm a hydraulic, and pneumatic cylinder, pump, and line system mechanic, and the answer is pressure.... pressure builds up from the hydraulic pump, and then transfers through hoses to extend, and contract the cylinders by filling them with hydraulic fluid, and vice versa for contracting them.
hope this helps!