A .dmg file is a copy of a physical disk, such as a CD or DVD, contained in a single file. The file extension means "Disk Image" and is proprietary to Apple. The operating system treats this file as it would a physical disk. Normally OS X will automatically mount a .dmg file when you double click it, however should this fail you can manually mount an image using tools that come with the operating system.
Open "Disk Utility" from your Applications list. It should be in a folder called Utilities.
Click "Mount" at the top and select the .dmg file you want to open. Once mounted it will appear on your desktop as an icon.
Double-click the icon of the image to open it.
Alternatively, you can drag the .dmg file onto the icon for Disk Utility; it should automatically mount the image.
Earlier versions of Apple's operating systems use .img and .smi file extensions; they cannot read the .dmg file extension.