The atomic force microscope (AFM) was a followup to the scanning tunneling microscope (STM). While the STM is still the highest-resolution microscope in existence, it requires conductive samples. The AFM has slightly poorer (but still ~1-2nm!) resolution and does not require conductive samples. Researchers have found neat non-imaging applications for AFM's, such as nanolithography and manipulation of nano-sized objects.
How contact mode AFM works
The idea is simple. Guide a cantilever with a sharp, downward-pointing tip (for instance silicon nitride with radius of curvature 5-10nm) across the sample. Measure the deflections of the tip and cantilever.
So, how are the tip deflections measured? Several methods were tried, but the best solution is to bounce a laser beam off the cantilever and measure where it lands on optical detectors. As the cantilever moves up and down, so does the reflected beam.
There's one important concept that makes AFM nontrivial. If the tip goes across a trench, there will be no deflections. Even worse, if the tip goes across a large bump, it will break. Simply dragging the tip across the sample won't work. Instead, a feedback system is used. The AFM user chooses a setpoint tip deflection. A computer, using data from the photodetectors, moves the sample up and down such that the tip deflection remains nearly constant at the setpoint. The amount of movement of the sample, as well as the photodetector data, is used to analyze the sample. In this way, the AFM can image peaks and trenches.
Tapping mode AFM
Even with the feedback system, contact mode AFM tips sometimes get stuck on the sample and break. To deal with this, the idea of tapping mode AFM was created. Tapping mode AFM uses a silicon tip driven near its resonance frequency. The tip oscillates over several nanometers, and the reflected light creates an AC signal on the optical detectors. The AC signal is converted to a DC root mean square value (basically the amplitude of the tip oscillations is measured). Like in the contact mode AFM, the oscillating tip is moved across the sample. The difference is that the oscillations allow the tip to break free from the sample easier, reducing the chance of it shattering. The reduction of oscillation amplitude (and DC RMS voltage) due to contact with the sample is used as the feedback mechanism.
Non-imaging uses of AFM
Clever researchers have found other uses for the AFM. One is nanolithography. In contact mode, the tip can be used to etch patterns in the sample. With patience, skill, and luck, extremely small devices can be produced this way. I have also read papers in which researchers have used the AFM tips to guide carbon nanotubes (with ~1nm diameters) toward electrodes. Sound like fun? Maybe for the first 10 hours. This is hellish.
AFM imaging variations
Besides contact and tapping modes, there are other AFM imaging modes occasionally used. I will just list a few. In non-contact mode AFM, the tip is moved well above the surface and Van der Waals forces are used for image contrast. This mode has low resolution but is non-destructive. Another idea is to vary the properties of the tip. The tip can contain a magnetic material to image magnetic properties of the sample. Similarly, a tip can be coated with various chemicals that are attracted selectively to materials on the sample. The possibilities abound.
How AFM tips are made
A good way to make AFM tips is to use anisotropic wet etching of crystalline materials. Anisotropic wet etches preferentially stop on certain crystal planes, which can leave sharp tips suited for AFM use. The best AFM tips are carbon nanotube tips. Carbon nanotubes are the strongest materials in existence and have diameters as small as 1 nanometer, making them ideal AFM tips.
I learned much of this information from reading the manual that came with a Digital Instruments scanning probe microscope.