The CPU (Central Processing Unit) is often called the brain of the computer.
It carries out all the instructions that make your computer work, from opening a file to running a game.
The CPU performs three main steps known as the fetch–decode–execute cycle:
The faster and more efficiently a CPU performs these steps, the quicker your computer can process information. Modern CPUs can handle billions of operations per second, making multitasking and complex applications possible.
https://www.youtube.com/watch?v=f-Tu7OLK3fY
RAM (Random Access Memory) is the short-term memory of a computer.
It temporarily stores the data and instructions that the CPU needs while performing tasks, like keeping multiple browser tabs, documents, or apps open at once.
When you open a program, it loads from the hard drive or SSD into RAM because RAM is much faster. This allows the CPU to quickly access the information it needs without delay.
However, RAM only stores data temporarily, once you turn off or restart your computer, everything in RAM is cleared. That’s why it’s important to save your work regularly to permanent storage like an SSD or hard drive.