If you mistake it for a rock and step on it, it will headbutt you in anger. In addition to the pain, it will also zap you with a shock.
Geodude compete against each other with headbutts. The iron sand on their heads will stick to whichever one has stronger magnetism.