What are Hydraulic Cylinders and How Do They Work?

A hydraulic cylinder is a mechanical device for transferring power by the use of high pressure oil acting against the surface area of a piston within the cylinder.
A hydraulic cylinder provides linear force in one axis in either one or two directions (known as a single or double acting cylinder respectively)

The cylinder is typically made up of 4 or 5 components:

Tube

Piston (optional)

Rod

Gland

End cap

In a typical hydraulic cylinder with a piston oil is fed in at either end via some type of 'port' and the piston is sealed to the tube by a double acting seal and also between the rod and the gland by a single acting seal. In addition, you will usually find a wiper seal is used in the gland to keep dirt out. This illustration is known as a double acting cylinder.

It is the pressure acting upon the piston surface which causes a the hydraulic cylinder to produce a linear movement. Because the rod is fixed to the piston, it moves too. Application of hydraulic pressure through the port to one side of the piston causes it to move in one direction, and application of pressure through the port to the opposite side of the piston will cause it to move in the opposite direction. In a single acting cylinder, oil only acts on one side of the piston so it can only be mechanically moved in one direction. An external force (gravity, or sometimes a spring or another hydraulic cylinder) provides force in the opposite direction.

Single acting cylinders can also be of the "displacement" type where the oil pressure acts directly on the end of the rod, and there is no piston. In this cylinder design the force is limited by the surface area of the rod, whereas in a cylinder with a piston, the rod can be of any size and the force can be calculated or controlled by the piston design.
Typically one end of the tube is fixed and on the end of the rod is attached the object to be moved, although it is possible to fix the end of the rod, and attach the object being moved to the end of the tube. In a double acting cylinder the "closing" power is always less than the "opening" power due to a reduced surface area of the piston for the oil to act upon. This reduced surface area is exactly the surface area of the end of the rod.

The size of a hydraulic cylinder can be virtually limitless, typically from a few centimeters in length to several meters, although in theory there are few limitations.