Pain is useful to survival, and therefore is evolutionarily conserved. There is a very rare syndrome with the congenital inability to experience pain that Is caused by mutations in the SCN9A gene, which codes for a sodium channel (Nav 1.7). Research on this channel has apparently produced some advances in pain medication, but not as much as expected.
Individuals with insensitivity to pain have many accidental injuries which can cause blindness, mutilations of the extremities, and other severe problems. Lack of ability to feel pain is serious handicap.
Pain is generally a useful red flag that warns us to stop the painful activity, or guides us into the doctors office; about half of all medical visits involve pain of some sort.
Considered as a symptom, pain helps guide the physician into the proper diagnosis and treatment. Normally the pain stops when the condition that produced it is corrected. Pain sometimes outlives it’s usefulness, however, and becomes a major problem on his own. The most obvious condition is “phantom limb pain”. Most people who have had an amputation will continue to experience pain in the extremity that is no longer present.
Back pain that has no valid surgical treatment will sometimes drive individuals to surgeons who will operate on them unsuccessfully. A second opinion, preferably by a medical doctor like a neurologist, is always a good idea with back pain without sciatica, numbness, or other localizing symptom to tell the doctor where to operate.
Neuropathic pain is another conundrum. I know of an individual who was bitten on the foot by a dog, and continued to have severe foot pain for many years after the original injury healed.
All pain is interpreted in the brain, and continuing circles of central nerve activation is the leading theory of phantom limb and neuropathic pain. Pain is not objectively measurable; there is no meter that you can attach to the patient and find how much pain they are actually having. The doctor must assume that the patient has the pain they are describing, and ask the patient to rate it on a 0 to 10 scale, describe its severity, time course, quality, and any factors that will make it better or worse. Most often this produces an avenue to treatment, but sometimes not.
A few decades ago, busy doctors would label the pain that they could not diagnose as “psychological”, and dismiss the patient to suffer in silence. Much of the pain, however, was very real to the patients, who joined in patient advocacy groups and produced a political backlash which induced doctors to overtreat the pain, often with opioids.
The over-prescribing doctors, and unscrupulous drug companies led to the flooding of the market with opioid medication, leading to the opioid crisis that is now being addressed. There is difficulty in making scientific progress on an adversary that cannot be measured properly.
Some doctors, usually anesthesiologists, specialize in treating the chronic, severe pain that standard medical practice has been unable to diagnose or alleviate.
They may use nerve blocks, antidepressants and combinations of different pain medication. Judicious propofol has been used also not only for chronic undiagnosed pain, but also depression.
My wife had a pain problem which responded to a combination of two simple medications, motrin and acetaminophen. The suggested overall approach is to get the best medical care available to diagnose the cause of the pain, and ask for a pain management referral if a solution is not found.
More information can be found in the appended Wikipedia article.