During inspiration, the external intercostal muscles contract, the internal ones relax, causing the ribs to raise upwards. The diaphragm contracts and flattens. In combination, the intercostal muscles and diaphragm cause the volume inside the thorax to increase, lowering the pressure. The difference between the pressure inside the lungs and atmospheric pressure creates a gradient, causing the air to enter the lungs