The central processing unit itself is made up of a few components, namely -
The CPU runs on a central clock, at a certain rate known as the clock frequency. This clock is used to synchronize the different components, and in one click tick, the CPU can fetch, decode and execute one instruction. A clock speed of 3.00 GHz means that the CPU clock ticks 3*10^9 in a second. The fetch-execute cycle looks something like this -
Tom Scott’s video on the topic
The RAM and CPU sit in physically separated units on the motherboard. The CPU registers are faster and more efficient than RAM, but at the same time are more expensive. As a result, in order to have the best performance at an economical price, we have small caches in the CPU that contain frequently accessed instructions and data, and comparatively larger RAM, from where all other needed instructions and data can be accessed. This caching of instructions greatly speeds up the working of the CPU. Caches are of two types: i for instruction and d for data and they are also placed in a hierarchy from L1, L2, … , where L1 is the fastest and most expensive category and they get slower and cheaper as we go down.