MIDI, HID and mapping
A controller sends messages, not sound.
A DJ controller doesn't carry audio to the software. Its knobs, faders, pads and jog wheels send short control messages, such as "button pressed" or "knob moved to here", over MIDI or HID, and the software does the rest. HID is often used for high-resolution jog wheels.
A mapping connects each message to a function. MIDI learn lets you remap a control without knowing its message: press learn in the software, move the hardware control, and the software picks it up. Club players can act as controllers too; rekordbox 7.2.16 added Phase support in HID mode [1].

