The CK2 All DLC Unlocker works by modifying the game's configuration files, specifically the appmanifest and dlcmanifest files. These files contain information about the DLCs, including their installation status and licensing details. The unlocker tool alters these files to reflect that all DLCs are installed and licensed, effectively unlocking them.