Pain receptors are in the brain and are conveyed by signals from the nervous system to the brain.
The parts of the nervous system are the central, the peripheral, the sympathetic.
Chronic pain continues after the injury or disease should have healed but for some reason the nerves in the area continue to transmit pain signals to the brain. Cases exist where brain chemistry misfires and causes pain when there is nothing wrong with the body. The most frustrating cases are those in which there is no reason for the pain at all. This is when patients hear "It's all in your head."
All pain is in the head actually, transmitted there by neurotransmitters to the receptors in the brain.
The simplest way to think of it is like a telegraph line. You stub your toe and the message starts. Relayed with lightning speed, the message reaches your brain that your toe hurts -- a lot!
You may grab your toe, rub it, check for broken skin. This is almost automatic except the brain is like a telegraph office telling your body to do all these things without your really being conscious of it. Or you may make the conscious choice to keep on walking pretending that nothing happened. The act of stubbing your toe was embarrassing and you don't want to draw further attention to it or if you ignore it, the pain will go away.
The greater the pain, the more the toe will demand attention. If it's broken, the telegraph line will demand more attention. If it's bleeding, especially a bare toe, your brain may insist you get attention to it to prevent infection.
Neurotransmitters are actually much more complicated. Contained in cells, they send messages through synapses that fire through neurons.
The telegraph line can go down when paralysis enters. Suddenly messages cannot get through. The spinal cord has been severed and in effect the telegraph line has been severed too. Messages of pain still get through although messages from the brain to move the parts of the body below the injury are skewed. Some don't get through at all, some get through all garbled resulting in the flailing described by Christopher Reeve and other paraplegics and quadriplegics.
In the case of chronic pain, the telegraph line sends very demanding messages about the part of the body in pain, to the exclusion of other messages like hunger or the need for sleep. The chronic pain takes over, dominating the brain, mixing up messages of memory, speech, eyesight, and so forth. Although the pain receptor is in the brain, the pain is felt in the back, feet, arms, necks, and in missing limbs even when doctors can find no organic reason for the pain such as fractures or sprains or diseases.
Amputated limbs give off phantom limb pain. Although the limb is gone, the nerves that led to it are still there and very sensitive. The pain can reach suicidal levels.
Amputees swear they can still feel their toes and knees because the nerves that connected to them remain very much alive in the nervous system. The telegraph keeps sending messages although many doctors refuse to believe this, adding to the misery of the amputee.
More on this can be found at Phantom Pain.
The cause of chronic pain is so often difficult to pinpoint due to the variety of factors causing it. Pain may start with a disease or injury but persist due to stress, emotional problems, improper treatment, or persistent abnormal pain signals in the body which all become entangled like a bunch of telegraph wires in a windstorm. It is also possible for chronic pain to occur without any previous injury, illness, or known reason.
It is thus frustrating for the patient and the doctor and the doctor often gives up first, leaving patients in chronic pain to find a new physician, try a new cure, a new medication, a new treatment, and find support through each other in person and through online support groups since many of them are housebound.