This is a very common problem. It occurs because the space between the shoulder blade (acromion) and the humerus (arm bone) is quite narrow with the rotator cuff tendons in between being trapped or damaged, during movement.
Pain can start gradually or after an injury. Pain gets worse with sleeping on that side or reaching for objects and often occur when the arm is elevated.
It is a clinical diagnosis and confirmed by MRI scans (or ultrasound scans). It is worth trying physiotherapy, local steroid injections (usually just one). If there is an identifiable problem and the phyio /steroids don’t work keyhole surgery may be required (Shoulder arthroscopy) with removal of the spur of bone (Sub-acromial decompression – SAD) and release of the CA ligament.