This is due to an injury like strain of the muscles between the ribs, or a sprain of the ligaments there. It can be caused by an obvious injury, but then the patient usually knows it. More likely, it’s caused by lifting something, or just by a sudden twist, even a cough or sneeze. The pain may begin 1-2 days later, when the muscle or ligament swells, so the person doesn’t even remember what they’d done.
We diagnose this by 1) first ruling out heart and lung disease, by our medical history & physical exam; and 2) finding that the point of pain is tender when we press on it, or hurts more with certain twisting or stretching movements of the chest or shoulder. No tests are necessary, since there aren’t any to find a strain or sprain.
Strains & sprains get better on their own. Our main job is to reassure the patient the real cause of their pain, that it’s not their heart or lungs.
Sometimes medical providers use terms like “costochondritis” (inflammation of the cartilage joining rib to sternum [breast bone]), “Tietze Syndrome” (same thing); “intercostal neuralgia” (supposedly pain from an irritated nerve between the ribs); maybe some other terms. I think they’re a little phony, because there’s no way to make such exact diagnoses, & it’s misleading to use fancy medical words when we ourselves can’t tell for sure. There is an actual Tietze Syndrome with a red, warm, swollen cartilage; it’s chronic, keeps on lasting, and is extremely rare (I’ve never seen a case). So I say “chest wall pain,” which means “a minor injury of the outside chest itself, not the heart or lungs.” I think that’s more honest.