There are many over the counter pain relievers, and many prescription strength. Some work to decrease inflammation and some work by altering brain chemistry or blood flow. All of them work to one degree or another. And all of them have side effects.
Many people take them habitually. None of these pain medications get rid of the cause of the pain. Many of them just mask the symptoms. No matter what type of pain you are in, you will feel better with proper exercise and nutrition.
This is an interesting slide show talking about a few different types of pain medications and their effects.