All computers have a CPU. The name is an acronym - Central Processing Unit, which neatly sums up its purpose. Central since it connects everything, Processing because that's the main task, and Unit is self-explanatory.
The CPU is mounted on the motherboard, which in turn connects all the parts in the PC. Through the motherboard, the CPU is able to read and write data from hard drives, RAM, the internet, and more. It is on the motherboard where you will also mount graphics card and RAM close to the CPU. The distance matters since the CPU makes billions of operations every second, so faster parts are generally closer together!
The CPU is divided into cores, which lets it run many calculations simultaneously. Why is this important? Say you're playing a game, while watching a video, while talking with your friends in Discord, while you... Yeah, multitasking is very common on a PC, so it's advantageous if the PC can divide work to different cores. More expensive CPUs tend to have more cores, which is very important for some people. For those who work with 3D models, video editing, or programming, more cores can really make a difference. Threads are closely related to cores. In short, a core is a physical divide of the CPU, while a thread is part of how the CPU structures work. Just like cores, more threads allows the computer to run more tasks at once.
A CPU looks to us sort of like a metal biscuit, but inside there are billions of tiny transistors. These are the miniscule workers who run all computations. In the 90s, CPUs had millions of transistors. The amount has increased by 1000x since then, which illustrates how much faster computers are today!