Electrical cables are used to connect two or more devices, enabling the transfer of electrical signals or power from one device to the other.