Pain in the rib area after long hours of sitting and studying is usually muscular, from the muscles between the ribs tightening up with poor posture, not something inside the ribs or lungs. This is common with long study sessions and often eases with movement and better posture.
Next Steps
Take short breaks every hour to stand and stretch your back and shoulders, and sit with proper back support. A warm compress on the sore area along with gentle stretching usually helps over a few days.
Health Tips
See a general physician if the pain worsens, doesn't ease with rest, or comes with breathlessness, fever or swelling over the area.