How does a cold roof help prevent ice dams?

By keeping that attic temperature similar to the outdoor temperature.

The key to fighting ice dams is to create a cold roof, with the temperature of the inside roof sheathing near that of the outside air temperature. To create such a condition,  outside air must enter low on the roof through the intake vents, sweep along ridge rafters, then exit at vents near the ridge. To prevent trapping warm air in the attic, an equal balance must be established between intake and exhaust air volumes. Since such a ventilation system is bringing cold air into an attic, the insulation must minimize heat loss at the attic floor. As an added precaution in case an ice dams still occurs, use waterproofing shingle underlayment. It provides a waterproof-barrier beneath roof shingles that pooled water from melting ice dams and driven rain cannot penetrate. An episode of Air Vent's podcast "Airing it Out with Air Vent" focuses on fighting ice dams.