While the general characteristics of the game stay the same wherever it is played, the exact rules depend on the particular code of play being used. The two most important codes are those of the IIHF and the NHL. Both of the codes, and others, originated from Canadian rules of ice hockey of the early 20th Century.
Ice hockey is played on a hockey rink. During normal play, there are six players per side on the ice at any time, one of them being the goaltender, each of whom is on ice skates. The objective of the game is to score goals by shooting a hard vulcanized rubber disc, the puck, into the opponent's goal net, which is placed at the opposite end of the rink. The players use their sticks to pass or shoot the puck.
Within certain restrictions, players may redirect the puck with any part of their body. Players may not hold the puck in their hand and are prohibited from using their hands to pass the puck to their teammates, unless they are in the defensive zone. Players are also prohibited from kicking the puck into the opponent's goal, though intentional redirections off the skate are permitted. Players may not intentionally bat the puck into the net with their hands.
Hockey is an "off-side" game, meaning that forward passes are allowed, unlike in rugby. Before the 1930s hockey was an on-side game, meaning that only backward passes were allowed. Those rules favoured individual stick-handling as a key means of driving the puck forward. With the arrival of offside rules, the forward pass transformed hockey into a truly team sport, where individual performance diminished in importance relative to team play, which could now be coordinated over the entire surface of the ice as opposed to merely rearward players.
Between the six players on the ice, they are typically divided into three forwards, two defencemen, and a goaltender. The term skaters is typically used to describe all players who are not goaltenders. The forward positions consist of a centre and two wingers: a left wing and a right wing. Forwards often play together as units or lines, with the same three forwards always playing together. The defencemen usually stay together as a pair generally divided between left and right. Left and right side wingers or defencemen are generally positioned as such, based on the side on which they carry their stick. A substitution of an entire unit at once is called a line change. Teams typically employ alternate sets of forward lines and defensive pairings when shorthanded or on a power play. The goaltender stands in a, usually blue, semi-circle called the crease in the defensive zone keeping pucks from going in. Substitutions are permitted at any time during the game, although during a stoppage of play the home team is permitted the final change. When players are substituted during play, it is called changing on the fly. A new NHL rule added in the 2005–06 season prevents a team from changing their line after they ice the puck.
The boards surrounding the ice help keep the puck in play and they can also be used as tools to play the puck. Players are permitted to "bodycheck" opponents into the boards as a means of stopping progress. The referees, linesmen and the outsides of the goal are "in play" and do not cause a stoppage of the game when the puck or players are influenced (by either bouncing or colliding) into them. Play can be stopped if the goal is knocked out of position. Play often proceeds for minutes without interruption. When play is stopped, it is restarted with a "faceoff". Two players "face" each other and an official drops the puck to the ice, where the two players attempt to gain control of the puck. Markings (circles) on the ice indicate the locations for the faceoff and guide the positioning of players.
The three major rules of play in ice hockey that limit the movement of the puck: "offside", "icing", and the puck going out of play. A player is "offside" if he enters his opponent's zone before the puck itself. Under many situations, a player may not "ice the puck", shoot the puck all the way across both the centre line and the opponent's goal line. The puck goes "out of play" whenever it goes past the perimeter of the ice rink (onto the player benches, over the "glass," or onto the protective netting above the glass) and a stoppage of play is called by the officials using whistles. It also does not matter if the puck comes back onto the ice surface from those areas as the puck is considered dead once it leaves the perimeter of the rink.
Under IIHF rules, each team may carry a maximum of 20 players and two goaltenders on their roster. NHL rules restrict the total number of players per game to 18, plus two goaltenders. In the NHL, the players are usually divided into four lines of three forwards, and into three pairs of defencemen. On occasion, teams may elect to substitute an extra defenceman for a forward; this seventh defenceman might sometimes play on the fourth line as a forward.