They are modified hairs, made of keratin protein with a hollow shaft and a muscle for each spine so they can be raised when the hedgehog feels threatened. Hedgehogs are born without any spines but, within just a few hours, around 100 small white spines emerge from the skin and harden. After four or five days these begin to be replaced by tougher spines that are darker in colour but still quite short. Then at two to four weeks old, the hedgehog begins to get its final coat of adult spines. By the time it is fully grown, a hedgehog has around 8,000 spines.
Answered by Luis Villazon