Your shoulder is a ball-and-socket joint. The ball portion of the
joint consists of the rounded head of the upper arm bone (humerus),
and the socket portion is made up of a depression (glenoid) in the
shoulder blade. The humeral head (ball) fits into the glenoid (socket)
creating the joint that allows you to move your shoulder. The joint is
surrounded and lined by cartilage, muscles, and tendons that provide
support and stability and make it easy for you to move.
It's your shoulder joint that lets you rotate your arm in all directions. Your range of motion depends on the proper articulation of the humeral head upon the glenoid.
In a healthy shoulder joint, the surfaces of these bones where the ball and socket rub together are very smooth and covered with a tough protective tissue called cartilage. Arthritis causes damage to the bone surfaces and cartilage. These damaged surfaces eventually become painful as they rub together.
As you might expect, there are many different reasons why you could be feeling shoulder pain, including injury, infection, and arthritis.