SEM uses a focused beam of electrons to create an image of the sample by scanning its surface. This beam interacts with the atoms in the sample, producing various signals that are used to form the image. AFM, on the other hand, employs a cantilever with a sharp tip that scans the sample's surface at the atomic level. TEM transmits a beam of electrons through a specimen to form an image, revealing internal details at a molecular level.