Regarding the latter, possibilities include inflammation at a tendon or ligament or the
joint capsule lining (tendonitis or bursitis etc) or a rotator cuff problem. If that is the case, anti-inflammatories such as NSAIDs (like ibuprofen etc) are often helpful and the problem improves with time, rest, and gentle stretching and sometimes physical therapy. If the problem is a rotator cuff tear, sometimes surgical repair is necessary.