First, please make sure that you have installed the latest driver updates for your joystick or gamepad from the manufacturers website. Next, you will need to go into the Game Controllers configuration in the Windows Control Panel and recalibrate the device using the Windows software. In some cases, installing the software that comes with the joystick may cause the recalibration option to not appear in the Control Panel. If this is the case, it is recommended to remove the third party software and use the Windows recalibration for this. Once you've recalibrated the joystick in Windows successfully, you should be able to configure it within the game.
To configure the joystick or gamepad for use in the game, you will need to use the Game Controls menu option inside the game. From the Game Controls menu, select the "Define" option across from the Controls Map. In the Game Controls screen, there is a column on the far right named "Game Controller".
If you haven't made any changes, you will notice a "?" next to each entry. This means that you will need to remap all of the buttons you want to use onto your joystick or gamepad. If you're using a joystick, be sure to keep the throttle key on the joystick at the halfway position. If the throttle is all the way up or down, the game will see this and will try to assign it to any button you try to change.