Computing and Networks
How a Computer Works: CPU, Memory and Storage
Beginner · Concept · 7 min read · Updated October 30, 2026
Picture a small kitchen. A cook follows a recipe, works on a counter, and keeps ingredients in a pantry. The cook is fast but can only handle what is on the counter. The pantry holds much more, but fetching from it takes time. A computer is organized in a very similar way, and once you see the kitchen, most computer vocabulary starts to make sense.
This entry explains the main parts inside a computer, what each one does, and how they cooperate when you do something ordinary, such as opening a photo. It does not require any earlier knowledge, and it keeps the focus on lasting ideas rather than on any particular brand or model.
Everything starts with bits
A computer stores and processes everything as numbers, and those numbers are written with only two symbols: 0 and 1. One of these symbols is called a bit, short for "binary digit". A group of eight bits is a byte. A single byte can hold one of 256 different values, which is enough for one letter of basic text.
Photos, songs, web pages and programs are all long lists of bytes. What a list means depends on the program reading it. The same bytes can be a picture in one program and gibberish in another. This is why file types exist, and why a computer needs rules for how to read each kind of data.
The CPU: the part that follows instructions
The CPU (central processing unit, also called the processor) is the cook in our kitchen. It reads one tiny instruction at a time and carries it out. A typical instruction is very simple: add two numbers, compare two numbers, copy a value from one place to another, or jump to a different instruction.
A program is a long list of these instructions. What feels like a smooth action on screen, such as moving a window, is millions of tiny steps done so quickly that you cannot see them.
Cores and speed
Modern processors usually contain several cores. Each core can follow its own list of instructions, so a computer can work on several tasks at the same time. The processor's clock speed describes how fast it steps through its work. More cores or a higher speed can help, but they are not the only things that decide how fast a computer feels. A fast cook with an empty counter still waits.
Cache: the cook's pocket
Fetching data from main memory takes long enough that the processor would often sit idle. To avoid that, processors have a small amount of very fast storage built in, called a cache. It keeps recently used data close at hand, like a cook holding a spice jar instead of walking to the shelf each time.
Memory (RAM): the counter space
RAM (random-access memory) is the counter. It holds the programs that are running and the data they are using right now. The processor can read and write RAM very quickly, which is why programs are loaded into it before they run.
RAM has one important limit: it is volatile. When the power goes off, its contents disappear. That is why unsaved work is lost in a crash or a power cut. Saving a file means copying it from RAM to storage.
The amount of RAM decides how much work can sit on the counter at once. Open many large programs and the counter fills up. The computer then has to shuffle things back and forth to storage, and everything slows down.
Storage: the pantry
Storage keeps your files, programs and settings for the long term. Unlike RAM, it keeps its contents when the power is off. There are two common kinds:
| Type | How it stores data | Typical traits |
|---|---|---|
| SSD (solid-state drive) | Electronic chips with no moving parts | Quiet and fast to start up and open files |
| HDD (hard disk drive) | Spinning magnetic disks read by a moving arm | Often cheaper per unit of space, slower, can be affected by knocks |
Storage is much larger than RAM and also much slower. This trade-off is the heart of how a computer is designed: small and fast memory near the processor, large and slow storage further away. A third group of parts, the input and output devices, connects the computer to people: keyboard, mouse, touch screen, display, speakers, microphone and network adapter.
How the parts work together
All these parts are mounted on or connected to the motherboard, the main circuit board. It carries the signals between the processor, memory, storage and devices. Many laptops and phones place most of these parts together on one small board or even on a single chip, but the roles stay the same.
A worked example: opening a photo
Follow what happens when you double-click a picture of a lake:
- You click. The input device sends a signal, and the operating system (the main control software, covered in what an operating system does) notices it.
- The system finds the photo file in storage. How files are named and located is the subject of files, folders and file systems.
- The photo's bytes are copied from storage into RAM, because the processor works with data in RAM, not directly on the pantry shelf.
- The photo viewer program is also loaded into RAM, if it is not already there.
- The processor runs the viewer's instructions. They read the photo's bytes from RAM and work out the color of each dot on the screen.
- The results are sent to the display, and you see the lake.
If you then edit the photo and save it, the path reverses: the changed bytes move from RAM back to storage, where they stay safe after shutdown.
Why a computer feels slow
Because each part has a role, a slow computer usually has one part that is the limit. This table gives common symptoms and likely causes. Treat it as a way to think, not as a guaranteed diagnosis.
| Symptom | Part that is often the limit |
|---|---|
| Slow to start and slow to open big files | Storage |
| Slows down when many programs are open | RAM |
| A single heavy task, such as video export, takes very long | Processor |
| Web pages load slowly while everything else is quick | Network connection |
Keeping software updated, closing programs you are not using and leaving some free space on storage help in many cases. A computer that has become slow over the years may also simply be too small for today's programs.
Common mistakes
- Confusing memory and storage. People say "my computer is out of memory" when they mean the storage is full. RAM is the short-term counter. Storage is the long-term pantry.
- Thinking more cores always means faster. Extra cores help only when programs can split their work. Many everyday tasks use just a few.
- Believing that closing a window always frees RAM at once. Some programs keep working in the background, so check before assuming.
- Not saving because "the computer remembers". Unsaved work lives in RAM and vanishes if the power fails. Save often, and keep copies of important files elsewhere.
- Buying only on one number. A fast processor paired with very little RAM or a slow drive can disappoint. Look at the whole system.
FAQ
What is the difference between RAM and storage?
RAM is fast and temporary, and it holds what is in use right now. Storage is slower and permanent, and it holds everything you keep. Think of the counter versus the pantry.
Is the CPU the "brain" of the computer?
It is a helpful picture, but the CPU does not think. It follows simple instructions very quickly. The intelligence in a program comes from the people who wrote those instructions.
Why do phones and laptops feel so different if they have the same parts?
They have the same kinds of parts, but built for different goals. Phones favor low power use and small size. Laptops and desktops can use more power and so can often do heavy work faster.
What is a GPU?
A GPU (graphics processing unit) is a processor specialized in drawing images and doing many similar calculations at once. Some computers have a separate one, and others build a simple one into the main chip.
Where should I go next?
Read about the software that manages all these parts in the Computing and Networks area, starting with the operating system. Knowing what the hardware does makes it easier to understand why software behaves the way it does.
Sources
- CS50's Introduction to Computer Science (opens in a new tab) — Harvard University (CS50 OpenCourseWare). A free introductory university course on computer science and programming
- Operating Systems: Three Easy Pieces (opens in a new tab) — Remzi and Andrea Arpaci-Dusseau, University of Wisconsin-Madison. A free textbook; its introduction explains how a program runs on a processor with memory and storage
Next in Computing and Networks: What an Operating System Does