G-code is the operational language for CNC machining. It tells numerically controlled lathes and machining centers how to move tools in order to perform various cutting operations. It is equivalent to manual programming where each operation is spelled out line-by-line and is separate from M-code and T-code, codes that control the machine and tooling. G-code fits somewhere between conversational control, where the operator describes the part and how it should be machined, and CAM, or computer-aided manufacturing, programs, where software develops the necessary toolpaths, feed rates, and so on needed for the CNC machine to cut the material into the finished part.
Although G-code as a term is often used interchangeably with Numerical Control (NC), it is actually only one component and works in conjunction with other codes to perform the appropriate tasks. The standard version of G-code is known as RS-274D, although other versions do exist for CNC machines with compatibility issues.