What’s the best over-the-counter pain medication? It depends on what hurts — and why. “If you can target the pain with a medication that treats the underlying cause, the pain relief will be better,” says Sunny Linnebur, PharmD.