The trapezoid in hockey is the area behind each goal in a hockey rink. In the trapezoid, the goaltender is allowed to play the puck on his stick and move around freely.
Because this area is directly behind the net, there are not many options that the goalie can pick from to advance the puck, but this restriction is what the NHL wants. This area was introduced to specifically curb the goaltender's movement behind the net.
In the 1990s, the popularity of defensive trap formations greatly decreased goal scoring in the NHL. This change was an issue as many casual fans watch hockey to see exciting goals and games. The trap decreased scoring greatly as games became more of a stalemate as each team waited for their opponent to make a mistake rather than actively try to create offensive chances by themselves. To combat low-scoring and slow hockey, the NHL created the trapezoid in 2004.
Legendary New Jersey Devils goaltender Martin Brodeur is often credited with forcing the NHL to implement the trapezoid. Throughout the neutral zone trap era, many goalies became proficient at playing the puck outside the crease, but none learned this skill better than Brodeur. Using his mobility and stick skills, Brodeur won two Stanley Cups and cemented his place as one of the iconic goalies of the 1990s and 2000s. The Devils' goalie was able to control the pace and strategy of the game behind the net, and as a goalie, his goal was to not let the other team put the puck on the net. This strategy worked, and other teams noticed, decreasing scoring by at least 30% throughout the 1990s until the trapezoid was introduced.
The trapezoid ranges 28 feet behind the net in a hockey rink. The trapezoid greatly diminished the area goalies can play behind the net as this area is only a small fraction of the rink-long space along the boards under the goal line. Goalies do have some leeway with this rule, though, as they are allowed to play the puck slightly outside the trapezoid if they have at least one skate in the crease while controlling the puck.
Unlike the other players on the ice, goalies do not serve the time for their penalties. These penalty minutes are attributed to them on the box score, but they are not usually put in the penalty box unless they commit an egregious penalty and get ejected from the game. Instead, another play from their team on the ice at the time of the infraction serves the two minutes in the penalty box.
If a goalie plays the puck behind the net and outside of the trapezoid, the referee signals for a delay of game penalty. This penalty is only a minor penalty and the other team has a man advantage for two minutes, and another player on the ice at the time goes into the penalty box. There are other ways to get called for delay of game, but this one specifically involves the goalie moving outside the trapezoid behind the net.
The goalie can roam the ice with the puck outside of the crease above the goal line. Outside of the crease, though, the goalie can be defended by the opposing team. This stipulation makes the goalie playing the puck this far up the ice a risky endeavour. The extent that a goalie can skate to is the mid-ice line as the referee calls a minor penalty if the goalie goes past that line.