Accumulation of snow on your roof is inevitable in the winter, and with freeze-thaw conditions also comes the risk of developing ice dams on your roof.
Ice dams happen when heat from inside a home’s attic melts snow on the roof, then freezes when it runs to the bottom of the roof where it is colder. This develops ice and prevents the rest of the meltwater from running into the eavestroughs, pushing it back up under the shingles.
To prevent this, you keep your attic cold, not warm. Proper insulation must be in place that prevents heat from inside the home from seeping into the attic.
The other way to look at it is keeping the entire roof the same temperature as the eaves. That way if snow is melting on the higher parts of the roof, it will stay as water and run off the bottom parts and into the eavestroughs.
If you believe that an ice dam has formed, remove snow from your roof immediately.