During inhalation, the diaphragm contracts, thus enlarging the thoracic cavity (the external intercostal muscles also participate in this enlargement). This reduces intra-thoracic pressure: in other words, enlarging the cavity creates suction that draws air into the lungs.