There are a number of different ways to translate the rotation of a stepper motor or servo motor shaft into linear motion. These include belt drives (same principle with chain drives), rack and pinion drives and ball screws. All are used by manufacturers for hobbyist/entry-level CNC Routers.
The ball screw was invented in the 1890s and provides an efficient linear drive with a minimum of friction and backlash. The main components of a ball screw are the screw assembly and the nut assembly. The screw and nut are machined with matching helical grooves large enough to hold ball bearings. The bearings are preloaded against the grooves of the screw to eliminate backlash. Because the only contact between the grooves in the nut and the grooves on the shaft is a ball bearing the screw turns with a minimum of friction.
In simple ball screws, bearings are recirculated within the nut assembly through the use of deflectors that redirect the ball bearings from the end of their path back to the beginning with every rotation of the shaft. The ball bearings are secured within the nut assembly by a wiper/shield. If any of the bearings are allowed to fall out of the nut assembly the entire ball screw must be either repaired or replaced. Therefore, the ball screw nut must never be rotated off the shaft.