It is difficult to accurately assess what might be happening to your dog without knowing its breed, age, diet, exercise routine, and medical history. Therefore, it is best to consult a veterinarian who can perform appropriate diagnostics to determine what is wrong and recommend the best medical treatment.