On steam there is usually a tag on game info pages about whether or not it works with a controller. If it doesn't, or the game is not on steam, then you can buy a keyboard/controller emulater like xpadder, if you are willing to spend money for a well made program, or something like this, for free.