When you inhale, the diaphragm and intercostal muscles (the muscles between your ribs) contract and expand the chest cavity. This expansion lowers the pressure in the chest cavity below the outside air pressure. Air then flows in through the trachea and bronchi and inflates the lungs.