The standard wired controller just plugs into the USB port and installs automatically on Vista. You may need to download a driver for XP, I'm not sure. If you have a wireless controller, you obviously need to buy the wireless PC receiver.
Then you can just set the controller buttons as hotkeys with an AHK script, or download Xpadder, which does the same thing.