When you insert a CD or DVD player into your Mac the OS X detects the disc type and then will launch the appropriate program. With CDs it will launch iTunes, with DVDs it will launch the DVD player. In most cases, this is exactly what you want to happen. However, if you want to prevent the DVD Player application from launching when you insert a DVD or iTunes from launching when you insert a CD then you need to turn these actions off.
I have my DVD player setup so that it doesn’t launch any application when you insert a disc. You can also customize it to open a different application. The first step is to open the System Preferences. Then, click the CDs & DVD preference
When you click on this it opens the preferences that lets you set the action you want to take for each device.
If you insert a blank DVD or CD you can specify whether or not to launch a disc burning application. The default, Ask what to do is generally a good setting for blanks.
If you insert a disc with content on it, music, pictures or video you can take additional actions. The options above the horizontal line are default behaviors. If you click Open other application you can browse to a specific OS X application. Run script is useful if you have any custom actions you want to perform on the disc. Finally, Ignore will do nothing. For DVDs, I prefer Ignore.