In A Nutshell

The STM is a powerful device to investigate surfaces and was invented in 1981 by Gerd Binnig and Heinrich Rohrer at the IBM research centre in Rüschlikon. Binnig and Rohrer were awarded the Nobel Prize in Physics for this invention in 1986. Figure 1 illustrates the functioning of the STM. A very sharp probe, in the best case there is a single atom at the end, scans the surface from a very small distance, usually in the order an atomic diameter. The scanning motion is controlled with piezoelectric elements. Due to a quantum physical phenomenon called tunneling effect, the voltage between probe and sample leads to a very small current. Information about the surface can be obtained by measuring this current as it depends on electrical properties of the sample and on the distance between the tip of the probe and the sample.
In general, there are two ways to scan a surface. Either the vertical position of the probe or the current is kept constant. The former only works on very flat surfaces but allows a high scanning speed. It is mainly used to study dynamic processes. The latter requires a feedback circuit to adjust the vertical position of the tip such that there is no risk that the tip could crash into the sample. At the end an image is generated from the x-y-z-coordinates of the tip (constant current) or the x-y-coordinates and the current (constant distance). Good STMs can even resolve single atoms. Figure 2 shows an image of a graphite surface with atomic resolution.
There are other applications of the STM such as tunneling spectroscopy which is out of the scope of this project. STMs only work on conducting surfaces. The are other microscopes of the same type, the family of scanning probe microscopes, which can scan non-conducting surfaces. The most important one in this family is the atomic force microscope. The principle of scanning is the same but it measures force, rather than current..

The STM body
Fig. 1: Schematic diagram of a STM. Source (Wikipedia).
The STM body
Fig. 2: STM scan of a graphite surface with atomic resolution. Source (Wikipedia).