During inspiration, the diaphragm and external intercostal muscles both contract, expanding the volume of the thoracic cavity, expanding the lungs due to the strong hydrogen bonding in the pleura, decreasing the pressure in the lungs (both intra-alveolar and intrapleural). When this is less than atmospheric pressure, the pressure gradient moves air in.
During expiration, the diaphragm and external intercostal muscles both relax, decreasing the volume of the thoracic cavity, causing pressure in lungs to increase and exceed atmospheric pressure