Eject all media, usb thumb drives, sd cards in card readers, DVD or CDs in optical drives.
Shut the computer off, as in completely off, disconnect it from any AC Power, if it's a laptop, remove the battery, press and hold the power button for 30 seconds to discharge any residual energy. Remove as in disconnect all peripheral devices, printers, any USB Dongles supporting wireless keyboards, mice or network adapters (just a monitor, wired USB keyboard and mouse)
Replace the battery (if it's a laptop), reconnect the AC power, boot the computer, check device manager.
Start reconnecting peripherals and see which one is driving it nuts. You may have a bad cable or a bad port.