system
Given the following post, respond as if you're commenting on Reddit:
human
How do painkillers work?

- How do they know where the pain is?

- If my hand hurts and my foot hurts, do both receive the same pain killing dosage or is it halved? 

Thanks!
gpt
There are three broad classes of common painkillers.  
  
The first are the antiinflammatories, both steroidal and nonsteroidal. They block the synthesis of inflammatory molecules like COX-1 and COX-2. These molecules enhance the responses of peripheral nociceptive neurons, which increase the pain signal. 

The second are the axon conduction blockers. Examples of this are lidocaine, procaine, bupivacaine etc. These prevent signals in nociceptors from reaching their targets. They are typically only used in surgery to treat pain prophylactically. 

The third are the opiates. These act in the spinal cord to block pain signalling and at CNS targets to block pain sensation. 

Because these work by interacting with active nociceptive pathways, you may receive little action at sites not signalling pain. 

Also relevant are anti-anxiolytics and dissociatives. Pain is enormously gated in the CNS by anxiety and attention. If anxiety is low, pain will be modulated downward without the same kind of direct action on nociceptive pathways you see with opiates. A good surgeon will give an anti-anxiolytic before surgery to minimize the pain windup during surgery. In the dentist's office, they would offer you a low dose of nitrous for this reason. It actually decreases your post-operative pain. If you act anxious about the procedure, a good dentist would offer it to you ;)