NSOM operates by bringing a tiny light source, typically a tapered optical fiber or a nanoprobe, extremely close to the sample surface—within a few nanometers. This proximity allows the evanescent waves, which decay exponentially and are not usually detectable in far-field microscopy, to be collected. The light source scans across the sample surface, and the interaction between the evanescent waves and the sample is detected and processed to generate high-resolution images.