The external intercostal muscles contract, moving the ribs upwards and outwards.
The volume of the thorax increases so the pressure of the thorax is reduced .
The pressure of the thorax is lower than the pressure of the atmospheric air, so air is drawn in by diffusion through the nasal passages, trachea, bronchi and bronchioles into the lungs. This equalises the pressure inside and outside chest.
Expiration (exhaling):
The muscles of the diaphragm relax and move up into it's resting domed shape
The external intercostal muscles relax so the ribs move down and inwards under gravity.
The elastic fibres in the alveoli of the lungs return to their normal length.
This decreases the volume of the thorax.
The pressure inside the thorax is greater than the pressure of the atmospheric air, so air moves out of the lungs by diffusion until the pressure inside and out is equal again.
You can exhale forcibly using energy.
The internal intercostal muscles contract, pulling the ribs down hard and fast.
The abdominal muscles contract forcing the diaphragm up to increase the pressure in the lungs rapidly.