Too many worms and viruses are attacking through the thumb drives (also known as USB drive or Pen drive), they are utilizing the Auto-run facility. You can disable the auto-run facility to avoid this issue. To disable
1. Start Menu => Run (Windows key+R also do the same)
2. Type gpedit.msc and press OK
3. A window will open, in that on the left pane choose “Administrative Templates” then choose System
4. Find Turn Off Auto Play on the right pane
5. Double click to open properties and choose enabled under settings tab
6. Choose All drives from the drop down
7. Click apply.
You are done.
Here is the explanation for the settings from the Microsoft
Turns off the Autoplay feature.
Autoplay begins reading from a drive as soon as you insert media in the drive. As a result, the setup file of programs and the music on audio media start immediately.
By default, Autoplay is disabled on removable drives, such as the floppy disk drive (but not the CD-ROM drive), and on network drives.
If you enable this setting, you can also disable Autoplay on CD-ROM drives or disable Autoplay on all drives.
This setting disables Autoplay on additional types of drives. You cannot use this setting to enable Autoplay on drives on which it is disabled by default.
Note: This setting appears in both the Computer Configuration and User Configuration folders. If the settings conflict, the setting in Computer Configuration takes precedence over the setting in User Configuration.
Note: This setting does not prevent Autoplay for music CDs.