I would assume you would connect the decks to the iMac by USB cable and they will send commands via MIDI, controllable from the Rekordbox software.
Press the BROWSE (SEARCH) button, then press the LINK button.
Press the LOAD 1 and LOAD 2 buttons.
Start your DJ application.
This may also help:
https://faq.pioneerdj.com/files/img/...acOS_001_E.pdf