Flame arrestors operate by allowing gases to pass through while cooling and quenching the flame front. This is achieved by a series of narrow passages that dissipate the flame's heat, preventing it from igniting the gas on the other side. The design of these passages is critical and typically involves materials with high thermal conductivity.