Woodpeckers are intriguing birds. They are able to bang their head against a wooden object with the speed and force that would shatter bone and cause brain damage in a human. They have amazing hearing that enables them to hear bugs underneath the surface of wood from quite a distance away. They also have amazing eyesight that they use to spot the holes made by bugs in wood. All in all, if you have food for a woodpecker inside your walls, it has all the tools needed to get it.
Of course, no one wants to have a woodpecker attacking their home, creating unsightly holes. Since woodpeckers are protected by law, getting rid of them might prove to be quite difficult. One solution is to get rid of any wood boring bugs that might reside inside your walls. Getting an exterminator to help with this is probably going to be your best bet. Denying the woodpeckers access to areas they have been attacking by using sturdy netting might also help.