What causes pain in the back and ribs

The causes of back and rib pain in patients are the following: First, strain on the lumbar back muscles and intercostal muscles: mostly caused by prolonged ambulation and improper sitting posture, such as often sitting with a twisted back, there will be an imbalance in the forces on the bilateral intercostal muscles and bilateral erector spinae muscles, often causing strain on one side of the intercostal muscles, manifesting as soreness and pain in the rib area, as well as soreness and painful sensations in the back. Second, intercostal nerve pain: mostly caused by viral infection, the pain is often characterized by a semi-circular pain in the lateral side of the rib cage, walking along the intercostal space, the pain often manifests itself as pinprick-like or burning-like, and the pain is very intense during episodes.