How does cover work in betting?

When betting on hockey, the team you bet on must “cover the spread.” This means the team must win or not lose by a predetermined margin of goals.