Instructions
Travel to Ilex Forest, which is west of Azalea Town where you receive your second badge.
Talk to the Move Tutor in Ilex Forest and select a Pokemon that you want to learn the Headbutt ability. Not every Pokemon can learn Headbutt, however you can teach the move the multiple Pokemon by talking the the Move Tutor again.
Stand in front of a tree with a Pokemon in your party that knows the Headbutt ability.
Press the "A" button to use the Headbutt ability on the tree.