Think through inhalation and exhalation separately and the events step-wise. Be aware of the movements of your own chest when breathing in and out.Inhalation (breathing in):The external intercostal muscles of the chest contract, which pulls the ribs up and out.Simultaneously, the diaphragm contracts which causes it to flatten (imagine it moving down).Both of the above steps causes the chest cavity volume to increase which therefore causes the pressure of the cavity to decrease.This causes air to enter the lungs because the pressure is higher outside the body than in the chest cavity. (Gases always travel from areas of higher pressure to lower pressure).Exhalation (breathing out):The internal intercostal muscles contract, which pulls the ribs down and in.Simultaneously, the diaphragm relaxes which causes it to become dome shaped (imagine it moving up).Both of the above steps causes the chest cavity volume to decrease which therefore causes the pressure of the cavity to increase.This causes air to leave the lungs because pressure is higher in the chest cavity than outside the body.Extension: P1V1 = P2V2 (Boyle's Law)