Intercostal muscles and the diapragm contract, which causes the ribs to move upwards and outwards. This increases the volume of the thorax, therefore lowering the pressure within the lungs. The pressure of the lungs is now below atmospheric pressure, so air moves down a pressure graident into the lungs.