Woodpeckers use their beaks to excavate cavities in trees for nesting sites and to extract insects for food. Often these birds are a symptom that the tree has an insect problem. Since federal law protects these birds, it is illegal to tamper with their nests, eggs, or young.