The guy who made a study and gave the answer got alternative Nobel prize.
"Thick bony skull with relatively spongy bone, especially at the occiput, and cartilage at the base of the mandible to partially cushion the incessant blows. Inside the skull, there is almost no cerebrospinal fluid in a very small subarachnoid space. The mandibles are attached to the skull by powerful muscles that contract a millisecond before strike, creating a tight, but cushioned structure at the moment of impact and distributing the force of the impact to the base and posterior aspects of the skull, thus bypassing the brain. The neurological mechanisms must be superb since these birds strike in a perfect perpendicular stroke to eliminate the torsional shear force that would otherwise tear the meninges or cause concussions .. Additionally, the woodpecker is protected, at least to some extent, by its size. Its brain is relatively small, resulting in a small ratio of brain weight to brain surface area. Any impact force would be spread out over a relatively large area making its brain somewhat more resistant to concussion than a human’s brain"