Nanotechnology enhances stain resistance by manipulating materials at the nanoscale, typically between 1 to 100 nanometers. By applying nanoparticles or nanocoatings to fabrics, manufacturers can create surfaces that repel liquids and dirt. These nanoparticles can form a protective layer that prevents substances from penetrating the fabric.