Breathing
The intercostal muscles run between each rib.  When a person needs to breathe in, these muscles contract and pull the ribs upward.  This creates more room inside the chest for the lungs to fill.