The CPU is the central processing unit of the computer that acts as its brain. It contains two main components - the control unit and the arithmetic logic unit. The control unit fetches instructions from memory and directs the overall flow of data by orchestrating the operation of all other parts of the CPU. It decodes and executes instructions by determining the sequence of operations. The arithmetic logic unit performs arithmetic and logical operations and contains registers for temporary data storage. It executes the instructions by performing calculations on data stored in registers. The CPU follows an instruction cycle of fetching, decoding, executing and storing instructions to process data according to programs.