What cable is used to connect computer to a switch?

It all depends on the interface of the switch but switches commonly use ethernet cable, most commonly Category 5 or 6 (CAT5 or CAT6).