Without knowing your mother's history, what is causing the pain, and what she is taking, we can't say why the pills aren't helping. However, different pain medications act differently on the body's systems and they way they relieve pain. For example, if you're taking an anti-inflammatory medication, your body works on reducing the inflammation or swelling that is causing pain. If you are taking an opioid, like codeine or morphine, the medication works by blocking the pain sensation and perception before it reaches the brain. Some medications combine the two types of drugs together.
There are also medications that were discovered to treat other problems, but doctors found that they were effective in treating certain types of pain. One well-known group is the antidepressants. Many people are prescribed antidepressants for pain relief.