CNC feedback mechanism
Many hobby systems these days are completely open-loop. The controller sends pulses to stepper motors and the stepper motors move incrementally a certain number of steps. There are hybrid servos which pretend to be steppers as far as control signals go, but actually have feedback to shaft motion, so they are closed loop at least to some degree. With open-loop steppers it's possible to lose steps because commanded acceleration or speed is excessive for the conditions or if the torque required is too great. That generally results in a ruined part, because remaining motions take place from a position that is not where the cutter actually is located.
The machine is homed on the table, the workpiece is located with respect to the machine coordinate system (manually it can be done with and edge finder, for example) so the machine knows where 0,0,0 is on the workpiece. Big VMCs usually have a probe consisting of a ruby ball on a probe that can locate the workpiece from features that already exist (for example, finding the center of a bored hole).
Good CNC systems at least have ball screws which don't suffer from backlash because they are preloaded with more pressure than the motion will require. It's possible to do limited correction for backlash by always approaching a position from one direction, and that's what manual machinists will do. To get fully closed-loop feedback you need something like Heidenhain scales on the machine to give the motion controller real-time feedback and real servomotors. For that kind of system, the motion controller is a fairly powerful computer, something like a DSP and/or FPGA implementation.
If you're using GRBL, Mach 3, Linux CNC you'll probably use an edge finder, coaxial indicator etc. just like you would on a manual machine. For rougher work, you can home the table to switches and assume the workpiece is accurately enough located wrt the machine coordinate system. If you have a jig to locate the workpiece on the table that can be pretty good for series production.