I think windows has moved away from executing autorun exes from discs by default a few versions ago. But back in the day it would prompt you what to do when you insert a USB storage drive, and just run whatever's set as the autorun if it's on a disc.
The common way to get USB malware to install automatically those days was to modify the USB drive to appear as a virtual disc drive, which worked.