Any Windows OS, from Windows 95 up to Windows Vista has a feature called autoplay. When new media is inserted (eg. CD, DVD, USB Flash device on Vista), Windows will search through the new media and look for a file named autorun.inf.
The autorun.inf file is a text file which gives Windows instructions on what files to load, what icon to display for the device under 'My Computer', and more.
The most important part of the autorun.inf file is the file it tells Windows to load. You can specify any file on the CD/DVD to load. If you want to load more than 1 file, or create more of a presentation, you need to use a tool like AutoRun Typhoon.
Autoplay can be enabled for more than just your CD/DVD-ROM, it can also be set for floppy drives (your A:\ drive), fixed drives (your C:\ drive), USB Flash drives, and RAMDISKs. By default, autoplay is enabled on your CD/DVD-ROM drive. You can find more information on how to enable/disable autoplay below:
The autorun.inf file
AutoPlayConfig - Free Utility for enabling/disabling autoplay
Autoplay on Windows 95/98/ME
Autoplay on Windows XP