CNC stands for computer numeric control which is a term invented to describe the codes (generated by CAD/CAM systems) used to control automated routing machines, lathes and milling machines.
Three axis refers to length, depth and breadth and are termed X Y and Z.
Five axis refers to X Y and Z as above along with two other axis B and C.
The B & C axis control the angle of the cutting head which adds more complex control to the machine.
Computer code is written to control these elements in CNC machines which are capable of machining very complex shapes.