It sounds like you are describing arthritic pain.
The two most popular forms of treatment for pain like this are:
- Rimadyl and other NSAIDs
Rimadyl is a nonsteroidal anti-inflammatory drug. It is similar to drugs like aspirin and ibruprofen. While it is quite effective at treating the pain, it does absolutely nothing to treat the disease or rehabilitate the joint. Furthermore, it has potentially lethal side effects.
- Glucosamine
Glucosamine is very promising in the treatment of arthritis and hip dysplasia pain in cats, dogs, and horses. Tests have shown it is effective in easing the pain and assists in rehabilitating damaged cartilage.
At home treatment might include heat therapy, a magnetic pet bed and massage.
In a pinch, you can use aspirin as an anti-inflammatory. You can read more about its use and dosage information here:
Giving your dog aspirin
I really think that you need to see your vet for further testing to find out what the source of the pain may be.
Let me know if you still have questions.