Computer numerical control (CNC) is the control of machining tools through automation or computer programming. A CNC machine follows coded instructions such as G-code and M-code. These instructions are typically written by a person or by CAD/CAM software. This allows for a highly automated process that can be more efficient than manual machining, providing users with better productivity, speed and accuracy. The most basic function of any CNC machine is automatic, precise, and consistent motion control. All forms of CNC equipment have two or more directions of motion, called axes. These axes can be precisely and automatically positioned along their lengths of travel. The two most common axis types are linear (driven along a straight path) and rotary (driven along a circular path).
Source: Key CNC Concept #1—The Fundamentals Of CNC