This article explains how to connect each model of AirPods to the PS4, including what accessories you'll need to purchase and what features aren't supported. Instructions apply to first-generation AirPods, AirPods with Wireless Charging Case, and AirPods Pro.
Believe it or not, the PS4 does not support Bluetooth audio out of the box. This means that you cannot connect AirPods or other Bluetooth headphones without purchasing an adapter. If you try to connect AirPods to the PS4 without an adapter, the PS4 will detect them and you will go through all the pairing steps, but the process will fail at the very last moment. Annoying!
To get around this, you'll need a PS4 Bluetooth adapter that supports Bluetooth audio and that you can plug into the console.
For this article, we used the Twelve South AirFly Duo, but any Bluetooth adapter that supports audio and can connect to a PS4 (e.g. via USB or the headphone jack) will work.