Scoliosis refers to a condition where the spine (which is normally straight when viewed from the front or back) develops a lateral, or side-to-side, curve:

Normal vs. scoliotic spine (posterior view)

The individual vertebrae also rotate towards the centre of the curve. If the main, scoliotic curve is present in the thoracic spine (where the ribs are attached), this rotation will cause the rib cage to distort, not only from side-to-side as you would expect from scoliosis, but also from front-to-back. As a result, the ribs on the inside of the curve will stick out at the front and, on the outside of the curve, they will stick out at the back.