In a rack-and-pinion system, motors drive the gearbox, which in turn drive the main jacking pinion. Motors produce modest torque, which is then multiplied by the gearbox and delivered to the pinion. Depending on the system, motors can be electric or hydraulic. Both have their advantages and drawbacks.
Electric motors can be controlled with variable frequency drives (VFDs), allowing for precise speed control and improved start-up. Although they provide higher efficiency and flexibility, they are more sensitive to environment and may suffer permanent damage if stalled by a heavy load.
Electric motors themselves are cheaper, but the actual electrical power system is much more expensive to built. Those motors also require greater maintenance and care.
On the other hand, hydraulic motors are designed to survive in harsh environments and can stall under an excessive load without suffering permanent damage.
They are also small and compact compared to an equivalent electrical solution.
If you want to learn more about jacking motors and hydraulics that power it, see the videos below.