What is the meaning of [Hat Trick]

Scoring three goals in hockey or soccer (football), or accomplishing three of anything.