The idea for how chronic pain works in the brain can be understood similar to PTSD where people develop neural pathways that create sensitivities or triggers to any reminders of a disturbing traumatic event. With chronic pain, people also develop neural pathways that create more pain and are increased by various triggers such as sitting, standing, or doing specific movements. Not all pain is this way. If you broke your leg, you would experience pain until it healed. For people with chronic pain, the pain continues even after the original injury or event has passed. This is often caused by stressful events occuring around the time when the chronic pain started. Even though a surgery or other procedure was completed, the recurring pain demonstrates that a neural pathway in the brain is sending out pain signals to the body even though there is no longer an injury. Just as a PTSD trigger may make someone feel they are in danger even though they are safe, chronic pain signals in the brain make the body feel that there is something wrong even though it has already healed. There may not be anything structurally wrong anymore, but the pain is still there because it is a learned sensitization to any stimuli that has ever increased pain.
The treatment process for Pain Reprocessing Therapy involves understanding the causes of pain, the neurobiological systems involved in pain, and reinforcing safety in the body that eventually leads to lessened or zero pain. You can read about this approach in the book The Way Out by Alan Gordon: https://www.painpsychologycenter.com/the-way-out/ or visit the Pain Reprocessing Website.