What sport is the hat trick played in?

The hattrick can be recorded in two sports. Hockey and Soccer. In hockey, it is when you score three goals, and in soccer it is when you score three goals.