Here is the basic concept of how CNC machine works: A CNC machine works under the control of the G-code which was created based on the drawing by the CAM program. The G-code contains the information to tell the machine how to fabricate the exact part you designed.
At first, the part drawing should be designed using software like CAD (computer-aided design), Pro-E, or UG, etc., then the program is introduced into a post-processor that converts it into G-Code (code that the machine can understand). The G-Code is transferred to a CNC Machine that controls all machine features like coordination, feed rate, location, and speed. Then the operator performs a test to ensure that the code has no errors to ensure a smooth machining process afterwards.
This gives very good accuracy and consistency, and the machine can produce quite complicated shapes and surfaces which would be difficult to process manually.
CNC machines can have several axes of movement, and these movements can be either linear or rotary. Basic machines move in one or two axes while advanced machines usually have at least three, X, Y, and Z, and can have more rotary axes. A five axis millingmachine is one that has three linear axes and two rotary, allowing the cutter to operate in a full 180º hemisphere and sometimes more. Oftentimes CNC machining processes require the use of multiple tools to make the desired cuts.