A modern airplane generally uses either a hydraulic pump or electronic motor to operate its landing gear. Each mechanism also uses an electronic safety system that prevents the wheels from being retracted while the plane is still situated on the ground.
Landing mechanisms were originally pulled up through a manual lever. Although the mechanism was reliable, airline companies decided to upgrade to electronic and hydraulic systems.
The hydraulic system uses electrical motors to power a pump, which supplies pressure to actuators located at each wheel. The actuators are small cylinders that have a small piston inside. The piston attaches to the actuator rod which uses seals to keep hydraulic fluid from escaping. As the fluid is pumped into the cylinder, pressure builds up and pushes down on the piston which lifts or lowers the retractable wheels.
An electrical system was developed to remove some of the components used in hydraulic systems. A motor is attached to a gearbox that is attached to the actuator rods. When a switch is thrown a motor pulls the rods, which turns the gear and raises the wheels. Although the electronic system simplifies the retractable mechanism it is still limited in its function. The placement of the gearbox needs to be as close to the wheels as possible and all parts must be maintained frequently to avoid any issues.