The captain and (during his absence on ice) alternate captains (not “assistant”) are players designated to be the point of contact between the referee and the team. Only these players are allowed to discuss with the Referee any questions relating to the interpretation of rules.
This privilege applies only to the respective captain/alternate captain who is currently on ice – any player, not invited by the referee, who comes off the bench to make a protest with the officials, shall receive a minor penalty. Also, this discussions relating to the interpretation of the rules cannot concern a penalty – no player, not even the captain, is allowed to make complaints regarding a penalty. When he makes such a complaint, he shall receive a minor penalty (a misconduct penalty under IIHF rules). The referee can (and often does) explain a penalty to the captains, but they are not allowed to complain.
Note that the referee crease serves quite a different purpose: It is an area where officials can safely discuss among themselves – no player (not even captain) is allowed to enter the crease when the referee is reporting to or consulting with the other officials. Should he do so, he shall receive a misconduct penalty. But it is also the place where referees will usually discuss with the captains.
Normally, there is one captain (marked with “C”) and two alternate captains (marked with “A”), one such player in each line. The NHL rules also allow to have no captain, but three alternate captains (this must be chosen prior to the game, and in this case, the Captain cannot be present in uniform). This is not possible in the international (IIHF) rules, where one captain and no more than two alternate captains must be appointed.
As in almost all team sports, the captain and the alternate captains also have important non-official duties. They are usually the senior/experienced players, having respect of other players, officials, and spectators. They also often serve as a point of contact between the players and the manager and the rest of team management.