A HEPA filter works by forcing air through a fine mesh that traps harmful particles such as pollen, pet dander, and dust mites.