Striking an opponent in the leg with a hockey stick using a swinging motion. A hack is also known as a slash and can be penalized if severe or if used with intent to injure.
Hacks happen often during a hockey game when players are fighting for possession of the puck in a crowded space on the ice. In this situation, the objective of the players involved is to retrieve the puck so they will not be penalized for accidentally striking an opponent with their sticks. However, if they strike at an opponent's legs to prevent him from playing the puck or getting past them, they will receive a minor penalty for slashing. If they intentionally swing their hockey stick in an attempt to injure their opponent, then they will receive a major or match penalty for slashing.
Another situation where the term "hack" is used is when a player attempts to hit a loose puck towards the net when there is a crowd around the puck. It is then said that the player is "hacking away at the puck".