Here, I assume you are refrring to the much more common Xbox 360 controller. If you have the spendier Xbox One controller, please see these instructions.
- Do not plug in the controller before completing Steps 2-6 .
- Determine if your Windows 8 is 32-bit or 64-bit with Control Panel | System | System
- Go to Microsoft and download the Windows 7 drivers for the bitness discovered in Step One.
- Once downloaded, right-click on the downloaded file.
- Choose Properties | Compatibility | Go to the "Run this program in compatibility mode for:" box | Pick "Windows 7" from the drop-down list | Apply | OK .
- If it asks you to restart the PC, let it.
- Now, plug in. You can use a USB 3 socket (blue inside) if all USB 2 sockets are used, but it won't run any faster with USB 3, whereas many hard drives and flash drives will run faster on USB 3. It's OK to use a USB extension cord of up to 16' (5 metres); any longer, and you will need a USB Active Extension Cable, or need to put a powered hub at the end of the (standard) passive extension cables.
- Tap the ⊞ Win key to open Start, type
joy.cpl
and press ↵ Enter to open the Game Controllers window, and the Xbox 360 controller will show up in the big frame. - Right-click on the Xbox 360 controller, and choose Properties.
- Run a controller test. Click every button, move the sticks; the screen lights which match that function should fire up in the Properties window, and moving the sticks will move the cross hair around the field of the joystick.
- Should the controller not work, plug it into a different USB port.
- Not all games use controllers; others setting changes to work. For specifics, check your game's help pages or instructions.
And, please promote the best answer by clicking on the checkmark to its left, and the up arrow (which all users here can do, not just the Original Poster), so other folks will know it's good. This also rewards the folks who take the time to give you an answer, by inching them one step closer to Ultimate Enlightenment, Invulnerability to Kryptonite, or some such thing.