A number of my friends are fist time Mac users and I've been answering a lot of questions. One place where new Mac users get stuck is with installing apps. My friends are used to the Windows method of installation. Launch a setup.exe file, click Next, click Next again to agree to the license, wait for install to complete, click Finish. Run the un-installer to remove the software. This is also the method used by most professional commercial software for the Mac. However, most Mac software downloaded from the web (Firefox, Chrome etc) is packaged as DMG or ZIP files and installation (and removal) is much easier.
A DMG file is a sort of disk image file. Mac OS X opens these files and mounts them in a similar way to how it mounts USB thumb drives or external hard drives.
The format allows secure password protection as well as file compression and hence serves both security and file distribution functions. Its most common function is the distribution of software over the Internet. When opened, DMG files are "mounted" as a drive within the Finder.
When you download a DMG file from the web, Safari and other Mac browsers may open and mount the DMG file automatically, usually on the Desktop. New users think that the application is installed and run it from the icon on the Desktop. Of course when the Mac is shutdown or restarted the DMG file is unmounted. Users boot into their Mac and panic because their program has been deleted.
The proper way to install a Mac application from the DMG (or ZIP) file is simpler. Once the DMG file is mounted (double click the DMG file), find the application icon and drag it to the Application folder.
You will be prompted for the system admin user name and password.
Mac OS X will copy all the application files to the Application folder. That's it. The app is now installed. To uninstall the app, drag the app icon from Applications to the trash can. Done.
Don't forget to unmount (eject) the DMG file. You can do that from the Finder.