A SIMPLE Explanation Of How Computers Work
The primary component of a computer system is its microprocessor. Secondary but also essential are the components used to store the data viz. the memory chips and the disk drives. Thirdly, depending on how we wish to interact with our computer we may need a keyboard, mouse, screen, speakers, microphone or printer. Finally if our computer is to exchange data with other computers we may also need a network card, router or modem with appropriate cables or wireless connections.
The microprocessor is the electronic chip that carries out a program's instructions sequentially one step at a time (unless it is a multi-core processor that is able to process more than one set of instructions at the same time.) The computer's power arises from its ability to execute billions of these simple instructions every second.
A program consists of a list of instructions telling the microprocessor what to do. The actual instructions depend on the processor model but essentially they are simple things like moving data to and from memory, disk, keyboard, mouse or network card, adding, subtracting, multiplying, dividing or jumping to another part of the program depending on the results of a calculation.
For example when an image on the screen changes the microprocessor must tell the screen the colour of each dot by getting the data from a disk file or network connection or by performing a mathematical calculation. Usually this happens so fast we are blissfully unaware of the amount of work required as it may involve the execution of millions of program instructions.
The computer progammer's job is to create this long list of instructions that makes the computer do what it's meant to by the one who commissioned the program. If even a single instruction is incorrect the computer will produce erroneous results, unexpected things will happen on the screen or the computer will "crash."