The birds’ respiratory system is very different from the one of mammals.
Their lungs are rigid and are not able to expand, but they have several air sacs that expand and contract with each breath to let the air flow through the lungs. The air always passes through the lungs in the same direction. See animation below.

This unique technique allows them to breathe and oxygenate at a rapid rate, which is optimal for flight.