In the NHL, this usually depends on the severity of the contact, and the decision to halt play is left to the discretion of the referee.
According to international game rules, when the goalie is shot or struck in the head by the puck the game is stopped.
Chat with our AI personalities
Depending on the seriousness and severity of the hit, and what hit the goaltenders mask, (puck, stick, skate) it is at the referees discretion whether to stop play or not.