Rare is the person who has not experienced some beyond-belief episode of pain and misery. Mercifully, relief finally came. Your eye healed, the stone was passed, the baby born. In each of those cases pain flared up in response to a known cause. With treatment, or with the body's healing powers alone, you got better and the pain went away.
Doctors call that kind of pain acute pain.
It is a normal sensation triggered in the nervous system to alert you to possible injury and the need to take care of yourself. Chronic pain is different. Chronic pain persists. Fiendishly, uselessly, pain signals keep firing in the nervous system for weeks, months, even years. But some people suffer chronic pain in the absence of any past injury or evidence of body damage.