When you insert a software CD-ROM into the drive on your Windows machine, it can be nice that the installer runs automatically. If you insert a virus infected USB stick, it is not so nice that the virus runs automatically…
Microsoft has a knowledge base article about disabling AutoRun (KB953252) on the current versions of Windows. The procedure may require you to install a patch (all instructions are included in the article).