In hockey there are both on-ice and off-ice officials that make sure the game runs smoothly. They will enforce the rules throughout the game and make the final decision on any tough calls.
On-ice officials are broken up into two subgroups of referees and linesmen. The roles of these two officials can vary depending on how many officials there are. For the most part though, the referee will call penalties, call goals, and enforce rules while the linesmen will look for line violations throughout the game like icing or offside.
Off-ice officials aren't as visible during a game but do a lot of important work. They are in charge of tracking the score, the game time, and penalty time. In larger games, they also handle video replays and keep track of detailed statistics for the game such as goals, assists, blocked shots, time between face-offs, and more.
The linesman and referees have different functions on the ice but do look very similar. Both officials wear a black helmet, a black and white striped shirt, and black pants. They also both have numbers on their backs for easy identification. However, referees will wear either an orange or red band around their arms. This is so that viewers and players can recognize their standing and tell them apart from linesmen.
There are four on-ice officials working every NHL game. The four on-ice officials include two linesmen and two referees. They split up and monitor different sides of the ice. At each game there are also 15 off-ice officials. The 15 off-ice officials are composed of five scoring officials, two goal judges, two penalty box attendants, one game-time keeper, one penalty-time keeper, one commercial coordinator, one official scorer, one judge for video replays, and one spotter.
In pro-levels that are below the AHL, women's NCAA hockey, and some other leagues they use a three official system. In this, there are two linesmen and only one referee. The referee is supposed to cover the whole rink, but if they can't make it to the other side in time the linesmen will take on the role of referee. In younger school leagues, there is a two-official system where each official is a linesman and referee.
Officials have to work their way up to officiating in the NHL but the pay is very rewarding for doing so. Referees usually get paid double than linesmen throughout all levels. Pay is about $30-$120 per game for youth and high school hockey. In college games, pay increases to be $400 per game for referees and about $200 for linesmen. In an NHL season, referees are paid between $165,000 to $360,000 and linesmen between $110,00 and $235,000.