The central processing unit (CPU) is the component that actually carries out the instructions of a computer program. Every calculation, comparison, and data movement that a program requests eventually becomes a sequence of tiny operations executed inside the CPU. Understanding the CPU means understanding two things: the functional blocks that make up the processor, and the wiring that lets those blocks exchange data with the rest of the machine.
Inside the CPU there are two headline components. The arithmetic and logic unit (ALU) performs all of the calculation and comparison work. It handles arithmetic such as addition and subtraction, and logical operations such as AND, OR, and comparisons like "is A greater than B?". The ALU never decides when to do work; i