If you're a carnivore then you'll be familiar with the intercostal muscles, even if you don't know it: spare ribs are actually the small muscles that lie between adjacent ribs, called intercostals.
Most of us have 12 ribs (the idea that women have one less then men is a myth), though a few people (< 02.%) have either one more or one less rib,
The 1st 10 ribs start at the spine and wrap around the body to join with the sternum (the bony plate at the very front of your torso) They form a cage to protect the vital organs of the body.
The last 2 ribs also start at the spine and start to wrap around the bottom of the torso towards the front, but don't quite make it. So ribs, 11 & 12 are called "floating ribs" because they just kind of hang there.
There are 2 main sets of intercostal muscles (if you ignore the really deep ones which nobody really understands anyway): the internal & external intercostals.
These small, slender muscles run at an angle down from the rib above to the rib below. They're at a slight angle, rather than vertical, so that they form a V.
Their job is to is raise the ribs when you breath in. They bend the ribs slightly, creating more space in the thoracic cavity so that your lungs can expand.
So you use them during normal breathing (respiration) when you inhale and when you cough, sneeze, etc (called forced inhalation).
Lying in a layer just behind the external intercostals, the internal intercostals are also set at an an angle... but perpendicular to their external cousins, like this: Λ.
Their action is to draw the intercostals back together after inhalation. If you think about it though, during normal breathing they're not used - the deflation of the rib cage during exhalation is passive (the intercostals aren't actually engaged) since it's the rib cage returning to normal after being stretched open. So the internal intercostals are only active during forced exhalation: coughing, sneezing, blowing up a balloon, playing a wind or brass instrument, and so on. The extra force needed to push air out of the lungs rapidly comes from the internal obliques pulling the ribs together to squeeze the space so that the lungs vacate air quickly.
If you've been coughing a lot, throwing up or had a bad ashtma attack & struggled to breath, then you may find that your chest or sides hurt. It's likely that the intercostals have been overused.
Just like the muscles in your legs if you run further than you're used to, your intercostals muscles will hurt if you've used them more than normal.
(It's very rare to get muscle strain in the intercostals - you have to do some pretty weird combination of side bending, shoulder movement, and lifting to do that.)
The intercostals can be massaged (though carefully) with a finger placed carefully and firmly between the ribs. If the area that hurts is accessible you can do this yourself: make sure you're definitely between a rib and just rock your finger back & forth on the places that hurt.
If you can't reach, or it's more than one or 2 places, then you might want a remedial massage therapist to help you out.