Why Do We Get Goose Bumps?

As you roam the neighborhood trick-or-treating tonight, you might encounter a common creepy sensation: goose bumps. But why does our skin get bumpy when we're frightened? And similarly, why does this bumpiness sometimes happen in response to moving (non-creepy) music? NPR's Skunk Bear explains.
Further reading: Why Does Music Give Us Chills?; Why Do We Get Shivers Up Our Spines?; and R.L. Stine on Scaring Children and Teens with Goosebumps and Fear Street.