What is the purpose of a cool down in sports?

So you don't pull a muscle.