Nanofilters work by employing materials with extremely small pores, typically in the range of 1-100 nanometers. These nanoporous materials can include nanofibers, graphene oxide, carbon nanotubes, and ceramic membranes. The small pore sizes allow them to selectively filter out particles based on size, shape, and sometimes even chemical properties.