The basic operation of a computer is called the 'fetch-execute' cycle.
The CPU fetches the instructions one at a time from the main memory into the registers. One register is the program counter (pc). ...
The CPU decodes the instruction.
The CPU executes the instruction.
Repeat until there are no more instructions.