I am not a vet and you should always consult your vet when making decisions on medication for your 4 legged family member. OK, so there's my disclaimer.
Dogs and humans have remarkably similar physiology. They get many of the same ailments that we do and the treatment for some of those ailments are the same for people as they are for dogs.
Minor aches and pains can be treated with Buffered Aspirin (be VERY careful here, dogs cannot tolerate Tylenol, Aleve, Ibuprofin, or any other over the counter pain medication) ONLY Buffered Aspirin, adjusted to their weight. So you can give buffered aspirin just as you would to a child.
If you have an older dog and they have arthritis, then buffered aspirin will work only up to a point. Once the symptoms become severe, if they limp even after taking buffered aspirin, they need to be on a daily pain management program, just like people. Unfortunately for dogs, they almost always get arthritis in their hips. People tend to get arthritis in their extremities, like their hands.
Having arthritis in your hips is not just painful, it's agonizingly, excruciatingly painful. Some people think that glucosamine and chondroitin stop the pain of arthritis - THEY DO NOT! They are dietary supplements, they have NO pain killing properties, none at all.
Some of the drugs that are well tolerated over longer periods of time are Tramadol (a very powerful analgesic, also prescribed for people) and to a much lesser extent, Rimadyl which is a Non-Steroidal Anti-Inflammatory Drug (NSAIDs) used to control the pain and inflammation associated with osteoarthritis. There have been reports of some dogs, just as there have been with people, that there can be severe adverse reactions to Rimadyl.
Rimadyl is technically a COX-2 inhibitor, similar to Celebrex. Celebrex is known to cause liver, kidney and even heart damage. I really can't recommend Rimadyl when there is a much more effective and safer treatment.
I tend to recommend Tramadol for long term pain management. Tramadol is a very effective and very powerful analgesic pain killer with virtually no side effects. It was invented in Europe in 1970 and so many American doctors (and vets) are not familiar with it. There have been 30 year studies on the long term effects of Tramadol on humans and there are no long term side effects. You may have to ask your vet about Tramadol for arthritis, because they may simply be unaware of it.
If you take your dog off Tramadol, do not stop giving it to them abruptly. (unless your vet tells you to!) They must dose down VERY gradually. It's also very important to never miss a dose of Tramadol. While it's not addictive in the sense that narcotics are, one of the drug's interesting characteristics is that it acts slightly like an anti-depressant. Skipping a dose or stopping abruptly will cause your dog to feel, well, depressed. Unlike Rimadyl, you can increase the dosage of Tramadol over time and you can add several pain free years of life to your older dog's life.
Some people give their dogs glucosamine and chondroitin. Those are dietary supplements and some people claim that it that it helps with arthritis. While that may be true, please bear in mind that they are not pain killers. If you want to give your dog glucosamine and/or chondroitin, that's great, but if your dog is limping and in pain, they need pain medication! Not dietary supplements.
Just as vitamin D and calcium are important dietary supplements to slow the progression of arthritis in people, they have no pain killing properties either. Osteoarthritis is an extremely painful medical condition in dogs and people. If your dog has arthritis, please see your vet and ask about long term pain management.
For long term pain management, as with all important medical decision, you must consult with your vet. That's two disclaimers!
Just as an FYI.....
Foods that are very bad for your dog; onions, grapes, raisins, chocolate, macadamia nuts and Avocados.