The operational amplifier is the building block of analogue electronics. It looks like any other eight-pin chip, and its job can be said in one sentence: it amplifies the difference between its two inputs by an enormous amount.
Two inputs, one output
An op amp has a non-inverting input marked +, an inverting input marked −, and an output. If the + input is even slightly higher than the − input, the output swings towards the positive supply. If it is lower, the output swings the other way.
Used like that, with no feedback, it is a comparator: a circuit that answers the question "which of these two voltages is higher?"
Feedback tames it
Connect part of the output back to the inverting input and the behaviour changes completely. The op amp now adjusts its output until its two inputs sit at the same voltage. The gain is then set by two resistors, not by the chip.
- Non-inverting amplifier: gain = 1 + Rf / Rg. With Rf = 100 kΩ and Rg = 10 kΩ, the gain is 11.
- Inverting amplifier: gain = −Rf / Rin.
- Voltage follower: output wired straight to the inverting input, gain of 1. It copies a voltage without loading the source.
Practical notes
The inputs draw almost no current, which is why op amps are so good at reading sensors. The output cannot go beyond the supply voltages, and on many common parts it stops a volt or so short of them. Check the data sheet for whether your chip is happy on a single supply or needs a positive and a negative one.
If you want the fundamentals in one place, with hand-drawn diagrams, start with Getting Started in Electronics, or browse all four books.

