Ubuntu automatically starts playing audio or video discs when you put them into your computer. If you don’t want this behavior, you can easily turn this off.
Navigate to System \ Preferences \ Removable Drives and Media
Here you can just uncheck the box for the disc type you don’t want to autoplay.
You can also disable autoplaying of portable media players such as an iPod.