When you plug in a memory stick in to your pc, Windows will look for a text file on the stick called Autorun. Assuming that autorun is not disabled in your Windows settings then the contents of that text file will direct your machine to execute a file from the memory stick.
From a convenience standpoint, this is useful but from a security perspective it’s a nightmare and you should take the following steps to check that Autorun is turned off on your machines.
For Windows 7, here are the steps (note: if you are on a domain then your IT admin should already done this centrally).
Click start > run > GPEDIT.MSC
This launches the local group policy editor
Now navigate to Computer Configuration > Administrative Templates > Windows Components.
Under Windows Components – look for Autoplay policies
In the right hand pane, right click on “Turn off Autoplay” and click edit
Choose Enabled for the options and make sure to select All drives from the drop down menu of the Turn off Autoplay on option, to disable Autorun on all drives.
Now click apply and close the Windows.
For Windows 10 it’s much easier. Type Autoplay in the search box to get to Autoplay settings. Now just set the slider to “off” and you’re done.