The capsular lining of your shoulder joint is normally thin and flexible and this allows freedom for your shoulder to move without restriction. In frozen shoulder, this capsular lining becomes inflamed and thickened and contracts. This results in pain and stiffness as the ball of the socket becomes entrapped by the capsule.
The cause of frozen shoulder is not clearly understood and nor it is understood quite how resolution to normal commonly occurs over time.
The image below on the left shows a keyhole (Arthroscopic) view of the inside of a normal shoulder. The rotator interval (labelled) is an area of exposed capsule that lies between the subscapularis and long head of biceps tendons at the front of the shoulder. You can see in this normal shoulder that this capsule in the rotator interval is thin and almost translucent. Compare this to the right hand image. This is the same view, but this patient has a frozen shoulder. You can see that the rotator interval is thickened, inflamed and contracted. This contraction is affecting the capsule around the whole joint and 'incarcerating' the shoulder.