Dear Student, During inspiration, the diaphragm contracts and pulls downward while the muscles( intercostal muscle) between the ribs contract and pull upward. This increases the size of the thoracic cavity and decreases the pressure inside. As a result, air rushes in and fills the lungs. During expiration, the diaphragm relaxes, and the volume of the thoracic cavity decreases, while the pressure within it increases. As a result, the lungs contract and air is forced out. Regards