First check the paws for ice balls in their pads in winter, thorns, infections, and the condition of the nails. Then consider whether or not your dog may have pain from a sprain, muscular, ligament or tendon problems (just as in humans this can be very painful) which your vet can treat and resolve in many cases.
Your dog may also have hip or elbow dysphasia which is due to abnormal development which is more prevalent in some breeds. Dogs can also get osteoarthritis. Ticks can also transmit diseases which can cause arthritis. There are also health conditions that can cause this including autoimmune disorders, disc problems, cancer, and hypothyroidism to name a few. Obesity in general aggravates most of these conditions.