If it is mild to moderate pain, the first place to start with with the R.I.C.E. Principles of rest ice compression and elevation. If it is an acute injury, like a tendon strain, this should help. If it is more of a chronic soreness, then ice after activities and heat before may also work.
Gentle stretching can also be beneficial, especially before activities.
If it is moderate to severe pain, or lasts for more than a few days, I recommend seeing your doctor for an evaluation.
Hope this helps - comment back with other questions