CNC programming consists of three main parts: the salutation (program safe-start), the body (material removal), and the closing (program ending). It utilizes various codes (G codes and M codes) for operations such as axial movements, machine control, and tool functions, with some codes specifying different machining procedures like turning and milling. Additionally, canned cycles simplify repetitive operations by packaging them into concise programming blocks, streamlining the machining process.