The most important invention in the history of computers is (arguably) the transistor. A transistor can serve two purposes:
It can amplify a signal (transistor radio).
It can switch on and off ridiculously fast.
This fast switching is what allows a computer to make decisions very fast.
By commons.wikimedia.org/wiki/User:Inductiveload
Think of a transistor like a gate which either allows electricity through (1) or blocks it (0). If a small amount of electricity is applied to the base pin, whatever is on the collector pin is permitted through the emitter pin.
When the base is "on" the electricity flows out the emitter
Controlling electricity like this gives us the ability to create boolean logic or logic gates.
Consider this:
Transistors can be made as small as 10Ā nanometers . That's 0.00001Ā millimeters.
A typical sheet of white printer paper is about 280,000Ā nm thick yet a transistor can be made 10Ā nm. They are so small that Apple's A11 chip in the iPhone X has 4.3Ā billiontransistors yet it is only 88Ā mm2.