Hedgehogs are easily recognized by their spines, which are hollow hairs made stiff with keratin. Their spines are not poisonous or barbed and, unlike the quills of a porcupine, do not easily detach from their bodies.

However, the immature animal's spines normally fall out as they are replaced with adult spines. This is called "quilling". Spines can also shed when the animal is diseased or under extreme stress.

All species of hedgehogs can roll into a tight ball in self-defence, causing all of the spines to point outwards. The hedgehog's back contains two large muscles that control the position of the quills. When the creature is rolled into a ball, the quills on the back protect the tucked face, feet, and belly, which are not quilled.

More Info: en.wikipedia.org