Most Injected or orally taken pain medications get distributed all over the body. Like pouring kool-aid mix in a pitcher.
They interact with where there is pain, but nothing specifically guides them there.
It is because of this people experience side-effects. For instance, Opioids block pain, but they also affect the digestive tract and tend to make you constipated.