Windows Vista uses a more advanced Autoplay system than previous versions of Windows, allowing you to select a variety of Autoplay options for different media types.
To change the Autoplay options, click on the Start Menu then Control Panel:
Now, select the "Play CDs or other media automatically" option:
To Disable Autoplay, untick the "Use Autoplay for all media and devices" box and then Save.
If you wish to be more selective about disabling Autoplay options, you can choose how to set up new default actions depending on the media type. For example, you may want Windows to automatically play a music CD every time one is inserted. To do this, simply pick the relevant drop-down option from the media type listing and then click Save, as in this example: