It is a buildup of ice from freezing and melting snow. When ice builds up in the gutters and reaches the shingles, it can go under the shingles.
It can be an indication of not enough insulation in the attic, but it can also be caused because of the sun and the weather combined with the pitch of the roof. Ice dams can send moisture back up under the shingles and make the roof decking wet and cause issues in the attic, interiors, or soffiting: such as deterioration, rot and mold. To fix this, warming wires can be placed on the roof, gutters and downspouts in those areas.