G-Code is the language used to control CNC machines. It’s one type of CNC programming that CNC programmers use, the other type being CAM programming. CAM programs will generate g-code from a CAD drawing, but the end result is still g-code.
Your machine’s CNC controller probably executes g-code, although there are other possibilities–Heidenhain, Mazak, Shopbot, and others have proprietary formats. Some machines with proprietary formats can also run g-code. It is the Lingua Franca (working language) of CNC.
In order to make a part on a CNC machine, you tell it how to make the part using a G-Code Program.