Bag filters work by trapping solid particles in a porous bag material while allowing clean water to pass through. The bag is typically made of materials like nylon, polyester, or polypropylene, which have fine pores that capture particles of a specific size.