There are four basic components in a computer system.
Central Processing Unit (CPU)
The main purpose of CPU is to process data in main memory. CPU is capable of arithmetic and logic operation on data stored in main memory.
The computer software (or program) and the data it wants to manipulate are stored in main memory. The instruction of program are fetched from memory by CPU and executed. The data are also stored in memory to retain their value, or state.
The secondary storage provides large, non-volatile, and inexpensive storage for program and data.
Input/Output (I/O) devices
I/O devices provide channels to transmit/receive data to/from a computer.