How does a CPU work?

The central processing unit (CPU) is the part of a computer system that carries out the instructions of a computer program, to perform the arithmetical, logical, and sums of the operations of the system. The CPU is like the "brain" of a computer.