Pain a warning signal from the body. It's something one should listen to, not just try to ignore and overrule. If I sprain my ankle it only hurts when I lean on it. Because it's healing. So I don't. Why would headaches or other "inconvenient" pains be different?
In my case headaches are usually caused by sleep deprivation causing high sensitivity to external stimuli, muscle tension, dehydration, or some combination of that. So I'll first try to take a nap and/or stick to low-stimuli environments, have a good stretch and/or heated up massage pillow for the neck, and make a quick home-made oral rehydration solution with some salt and sugar. That usually alleviates most if not all of the pain.
And I'm not saying painkillers should always be avoided. If I have insomnia-induced headaches in the morning and a long day ahead with many social interactions, then I know that headaches will make me a grumpy asshole, so I'll obviously will take a painkiller for everyone's sake. And sometimes I can only fall asleep if I take a painkiller to get rid of the headache first, so I need it to break the vicious cycle. I'm not saying people should "walk it off" here, just to focus on trying to figure out the actual cause first before medicating the symptom way. That's also healthier in the long run, no?