The arrector pili muscle is made to lift the hairs on the body, which causes air to get trapped between the hairs and provide a layer of insulation against the cold. These muscles can also react in cases of fear and give different results in humans than animals.
When a scared animal's arrector pili muscle reacts, its hair stands up making it appear larger and more intimidating. When a cat's tail and hair on its back stands up, that is a sign of fear and a defense mechanism. The cat appears larger to whatever might have scared it and often the appearance will send the other animal away. In humans, hairs stand up when someone is scared, but it does not make the person appear larger. It is more of a warning system to help alert people to remove themselves from a particular situation.