To play with your wireless Xbox controller on you PC/Steam you need to have a wireless receiver. This plugs into USB and you just have to install the drivers that come with the receiver. There pretty cheap to buy if you already have the wireless controller. Wireless Xbox USB Receiver
I think the same applies for a wired Xbox controller apart from it plugs directly into the USB.
After connecting you should just be able to go into the games options and select your Xbox controller, and set up the keys.
If the game does not support your Xbox controller you can download this program called Joy2Key. You can set it up so it simulates you pressing keys on the keyboard. e.g you can set the spacebar to be A on the Xbox controller. The good thing about Joy2Key is that it should work with all game pads and joysticks.
If you wish to download Joy2Key click HERE
. The download buttons are on the right.
Hope this helps!