the 'drumming' is territorial- claiming both a territory and to attract a mate. With Great Spotted woodpeckers both sexes do it. Can be heard from Jan through til end of June. Generally a particularly resonant tree is picked to carry the sound.
As regards food, woodpeckers will eat seeds and insects. They use a stump or such as like as an anvil to hammer at pine cones. The holes you see can be up to four inches deep as they go after wood boring grubs. They will eat a lot of ants as well.
If you have never tried this it can have great results. If you hear a woodie drumming pick up a hard branchor a stone and beat a tattoo on a tree. Chances are the woodpecker will come to investigate the 'intruder'. Once they discover its not a rival they lose interest but still goof fun. I once had a pair of Greater Spotted plus two young come to nose at me!