A hedgehog's defence is its quills — thousands of stiff, hollow spines covering its back and flanks. When threatened, it curls into a tight ball, tucking its head and soft belly inside so only the spines face outward.
The spines are not barbed or fired like a porcupine's; they simply make the hedgehog painful and awkward to eat. A predator that persists usually gives up and looks for easier prey.
It is a passive strategy rather than an aggressive one, and it works well enough that hedgehogs have little need for speed or fighting ability. Their main vulnerability is that the ball trick does nothing against cars or garden machinery, which is why the species needs help from people to thrive.