Esther Inglis-Arkell has the answers for you. They involve a different kind of brain cushion, strong neck muscles, and an extra eyelid that acts as a seatbelt for the eyeballs.
The eyelid seatbelt, and what it means for you
. . .
In 2006, ornithologists Ivan R. Schwab and Philip May set out to study the apparently unbreakable heads of woodpeckers. These birds hammer their beaks into tree trunks searching for insects about, with about 500 strikes a day being typical. During the mating season, when males want to show off their, ah, drilling skills, they will slam their heads into a tree about 12,000 times a day. Each slam has a deceleration force of about 1200 g. A human will concuss themselves at 100 g.
How does the woodpecker do it? Mostly, it seems, by going against what most people assume about concussion prevention. Humans have hard heads, supposedly to ward off shocks, and a layer of fluid around the brain, supposedly to cushion it. Although humans do benefit from their hard skulls and the fluid, the woodpecker takes a different approach. It has a spongy skull that surrounds the brain neatly, with no fluid cushion. The brain can't splash around, moving freely through fluid if the hit is hard enough, the way it can with humans.
The bird has a softer beak than would probably be expected, and strong neck muscles that engage to absorb the shock of the blow. But the woodpecker can't just protect its brain. It has to add a layer of protection for other organs in its head. While most of the structures are tough (the woodpecker's tongue is more a tactical tool than a sensitive organ), there is the perpetually vulnerable eyeball to worry about. It is half inside the head, half exposed to the world, and that can lead to big problems. To stave these off, the woodpecker has a third eyelid, which slams down in front of the eyeballs just before the bird strikes the wood. These eyelids function as seatbelts, keeping the eyes from popping out of its skull from the sheer force of deceleration. (I didn't know eyeballs could do this, and I now want another eyelid to make sure this never ever happens to me.)
. . .