USB cable has 4 electronic wires, which includes power lines and data lines. Two out of 4 are used to supply / carry 5V electric power to peripherals. The rest two wires are used for transmitting data and commands. Famous USB ports versions are USB, USB 2.0, USB 3.0, microUSB type-B (mobile phones), USB type-C.