In days past that might have been a parallel or serial port. Today it’s almost always USB, specifically serial over USB. USB has some safety features built-in, such as current limiting.
Also known as an RS-232 port, serial ports provide very slow speeds and have been superseded by USB on desktop computers. USB-to-serial adapters are available for old peripherals. DB (D-Sub ...