On Ubuntu 12.04 LTS Auto Mount Feature is enable by default, when you insert a media disc or flash drive it will be auto mount. If you want disable it, follow the guide how to disable auto mount on ubuntu 12.04
Step-by-step to Disable Auto Mount in Ubuntu 12.04
Step 1. First, install dconf-editor
sudo apt-get install dconf-tools
Step 2. Open dconf-editor then navigate to org -> gnome -> desktop -> media-handling
Step 3. uncheck value of automount and automount-open.
automount: “Whether to automatically mount media”. If set to true, then Nautilus will automatically mount media such as user-visible hard disks and removable media on start-up and media insertion.
automount-open: “Whether to automatically open a folder for automounted media”. If set to true, then Nautilus will automatically open a folder when media is automounted. This only applies to media where no known x-content/* type was detected; for media where a known x-content type is detected, the user configurable action will be taken instead.