When breathing in...
The intercostal muscle between your ribs and the diaphragm contracts, and the thorax volume increases. Pressure outside is now greater than pressure in the thorax, hence air rushes in. The lung's exchange services, alveoli, absorb the oxygen into the bloodstream and transfer waste products out. Then...

When breathing out...
The intercostal muscles and diaphragm relax, decreasing the thorax volume, pushing the ribs and sternum in. Air rushes out due to the pressure difference.

And that's how we breathe.