The intercostal muscles are found between the ribs. The muscles can contribute to pain in and around the rib cage. They are also a major contributor to pain in the sides and in between the ribs known as a side stitch.
The diaphragm is a muscle found under the lower ribs. It can contribute to breathing problems, pain in the chest and ribs and can cause the sharp pain in the side known as side stitches.