There are a few different possibilities here.
First the muscles between the ribs, called the intercostal muscles, can indeed become sore and strained. Typically this occurs with heavy lifting exercises or with other recent vigorous physical activity. Typically, with this kind of pain, there may be some soreness if you press on the area of the ribs that is affected, and the pain may be worse with taking a deep breath.
Second, the muscles that run up and down the sides of the spine in the back near where the ribs take off may become sore or strained. This is called paraspinal muscle strain
or spasm, and it is one of the most common causes of low back pain, although in some cases it also may be confused with rib pain. If you have tightness in your lower back, this makes a paraspinal muscle spasm more likely.
I suggest that you go to see your primary care doctor
. They will be able to perform an examination and figure out what exactly is going on. Based on what they find, they may recommend rest or light stretching exercises, anti inflammatory medications, and heat packs for pain relief.
I hope you are feeling better soon!