When there is an ice dam, snow melt water runs down a roof to the lowest point, which is where an ice dam classically forms because it is the lowest and coldest part of a roof. The melt water has no place to run off the roof, and pools behind the ice dam. Hydrostatic pressure then pushes the snow melt up the roof, and can enter under shingles, and enter the home.