An air barrier is something that blocks air from moving from one side to the other.
This is an important concept because a lot of heat can move in or out of a building with air movement. This is called convective heat transfer.
Spray foam insulation is an exceptionally good air barrier. It forms a perfect fit to any size or shape cavity, cathedral ceiling, as well as any cracks, gaps or voids left by construction.
Other types of insulation, even if they have high r-value, often allow drafts or air movement through electrical receptacles, trim, rim joists, etc. This greatly reduces the effectiveness of the insulation and the hoped for high r-value really doesn’t exist.