In the processor.
The processor is the brain of the computer. All fundamental computing takes place in the processor. Other components contribute to the computation (by doing such things as moving data in and out of the processor), but the processor is where the fundamental action takes place.
Unlike a human brain, which combines memory with processing power, a computer processor has very little memory. It must rely on other components to hold data and programs and to save results. The memory in a computer system is of two fundamental types:
Main memory is where programs and data are kept when the processor is actively using them. When programs and data become active, they are copied from secondary memory into main memory where the processor can interact with them. A copy remains in secondary memory. Main memory is intimately connected to the processor, so moving instructions from the program and data into and out of the processor is very fast. Main memory is sometimes called RAM. RAM stands for Random Access Memory. "Random" means that the memory cells can be accessed in any order.
When people say that a computer has "128 megabytes of RAM" they are talking about how big its main memory is. One megabyte of memory is enough to hold approximately one million characters of a word processing document. (There will be more about bytes and megabytes later on in these notes.) Nothing permanent is kept in main memory. Sometimes data are placed in main memory for just a few seconds; only as long as they are needed.