Is your account set as the system administrator? If not you may not have permission to install devices. Get the administartor to install it or give you privileges.
If you are administrator make sure you are logged in under the admin account.
FOLLOW the instructions that came with the joystick. Plug and play is a trademark. Not a guarantee of ease of install... Some devices require you to install software/drivers form the CD before connecting the device. I think my logitech joystick requries that.
If you did not follow the instructions the first time through you have to uninstall the device first. Unplugging it should do that hopefully, if not go to the instructions below for using device manager, find the controller name and then right click it and select uninstall. Then reboot and start from scartch with the device unplugged.
Now assuming the easy stuff didn't work:
What operating system? (XP, 2000, 98/ME etc.) XP or 2000 this should be painless (maybe ME too). 98 you need to run setup from the game controller installation CD.
Have you kept the operating system updated? (service packs etc.) There are hundreds of software updates for XP and 2000.
Do you have an internet connection that is always on? (DSL, cable)? If not make sure the modem and phone line are available. If a driver is missing XP or 2000 will ask if you want them to search the MS downloads site for updates/drivers.
Did you plug the controller into the USB port or the gameport?
If you are running XP, or even an updated version of 2000 (it's up to service pack 3 or 4 now) and you plugged it into a USB port it should autodetect and install. If it did not then you may have something wrong with the USB port. The port has to be working before you can do anything. Using the Gameport may not be as easy as the USB port. SO with the device plugged into whatever (game or usb) first off...
Go to start-control panel-double click SYSTEM-hardware-device manager. a long directory like listing of hardware on your system will appear. is anything has a yellow circle with anm exclamation mark in it taht device is not working properly. Make sure everything under "Human interface devices", "sound, video and game controllers", and "Universal Serial Devices" is ok.
If not use right click the yellowed out devie and select trouble shoot. Follow the wizard that pops up it may helkp you fidn the problem.
If everything is ok you need to make sure that the usb or port you are connected to is actually wired in. A few on the back panel are always wired (they are on the motherboard). front panel ports may not be connected to the MB.