Using technology from Shazam, the music recognition service Apple acquired in 2018, Apple Music is now able to rapidly identify the songs within a DJ mix, the rights holders of those songs, and directly pay them, as well as compensate the DJ and the mix supplier, a first for a major streaming service.
Source: Apple Music Officially Launches DJ Mix Technology to ID (and Pay) Rights Holders