Ingmars answer is correct, I just wanted to add something:
Ingmar mentioned it already: You can find this expression in the bible, in the book "Hiob/Iob/Job/Ijob" (there are several writings of this name in different translations) which was written 2500 years ago in Hebrew language:
As you can see, in this text the bible is talking about the hair on your "flesh", which obviously is your body (i.e. arms, legs, etc.). The bible is not talking about the hair on your head.
So the origin of this expression is goose bumps (also: "goose pimples") (in German: »Gänsehaut« = goose skin). Millions of tiny muscles in the skin, each of them attached to one hair, contract and rise up this hair.
This is a reflex from the times when our ancestors had fur. Raising up all hairs on the body had two effects:
- There is more air in the fur, so it isolates better against cold temperatures. This is why we still get goose bumps when we feel cold.
- The fur (and so the hole body) becomes more voluminous. You look bigger and stronger. This might impress smilodons and other carnivore that had appetite on you. This is why we get goose bumps when we are in panic.
The original meaning of "my hair stand on end" = "Mir stehen die Haare zu Berge" is:
I have goose bumps because I'm in panic.