Ports enable connection of hardware devices like keyboards, mice and printers to a computer system. Different port types - serial, parallel, PS/2, USB, infrared, Bluetooth, DVI and HDMI - are used to connect various devices and transfer data or power. Ports are located on the back or front of the system case and devices must match the correct port type to connect without damage.