All pen tablets connect to a computer with a USB cable. Some pen tablets ALSO connect to a computer wirelessly - almost always Bluetooth. See: Wireless connection
If you are getting a tablet setup for the first time, use the cable.
In general, I recommend using the cable because any wireless connection typically has a little extra latency and is more prone to interference. Also in general, I've found wireless connection to sometimes just be a bit flakier and require manual reconnection sometimes.
Pen tablets, because they do not have a screen, don't draw much power and don't transmit a lot of data. So any USB 2.0 cable will work that fits the tablet and that carries data.
Modern pen tablets all have a standard USB-C port flush with the edge of the tablet.
Older pen tablets may use micro-USB ports. Some even older tablets, have the cable permanently affixed to the tablet. An example is the Wacom Intuos 4 XL.
If you want to use 3rd party cables, learn more here: Using 3rd-party cables with your drawing tablet.