Rules reference
Updated
Independent desk. Figures are traced to named sources and corrections are logged — see the editorial policy.
Both rules exist for the same reason, to stop a team from parking a player or the puck in a place where it gains an unfair advantage.

Two calls account for more stoppages than any other in hockey, and both are made by the linesmen, not the referees. They are often explained badly, so here is each one in turn.
The rink first
An NHL rink is 200 feet long and 85 feet wide. Two blue lines divide it into three zones: the neutral zone in the middle is 50 feet long, and each end zone is 64 feet from the blue line to the goal line. The goal is 6 feet wide and 4 feet high.
Offside
A play is offside if an attacking player crosses the opponent's blue line before the puck does. The puck has to go in first. A player is not offside as long as the skates are still touching the line, which is why replays measure the skate blade against the line. The play is stopped and a faceoff takes place in the neutral zone.
Icing
Icing is called when a player shoots the puck from behind the centre red line and it crosses the opposing goal line without being touched. The rule exists to stop a team that is under pressure from clearing the puck down the ice and getting a free change. Icing is not called on a team that is short-handed, and not if the goaltender plays the puck.
Hybrid icing
The NHL uses "hybrid icing". When the puck is shot down the ice, the linesman judges which player would reach it first, based on position at the faceoff dots in the end zone. If the defending player is judged to be first, play continues; if the attacking player is first, icing is called. The rule was introduced to avoid collisions along the boards at high speed.
What follows an icing
The faceoff takes place in the defending zone of the team that iced the puck, and that team cannot change its players. The stoppage is intended to be a penalty in itself, which is why a tired line has to stay on the ice and attempt another faceoff.