Connect the RJ-45 end to the console port of the network device.
Connect the DB-9 or USB end to the computer's serial port or USB port.
Open a terminal emulation program on the computer.
Configure the terminal emulation program with the correct settings (baud rate, data bits, parity, stop bits).
Start the terminal emulation session and you will be able to access the device's CLI.