In the Spotlight (last page) article in the January 2010 issue of Macworld, John Gruber briefly mentions that he has many friends who have improperly installed applications by dragging the disk image (DMG) file directly to the Dock. However, the Spotlight article did not mention how to fix this problem.
My brother in-law had this problem, and was totally confused why, every time he clicked on his Dock icon, OS X mounted the disk image and showed him the install folder, and then moved on to open the program. For those new to the platform, here's how to solve the problem. (Be sure to back up any program-specific files you'd like to keep before doing this.)
The first thing to do is to remove the Application's icon from the Dock. This is done by dragging it off the Dock until it disappears in a puff of smoke. Now do a Spotlight search (Spotlight is the magnifying glass at the top right of the screen) with the name of the specific troublesome application, and then click on the Show All option at the top of the list.
There you will see a list that will include the application and one or more copies of the DMG file (in my brother-in-law's case, he had two copies of the DMG and three aliases, totaling five copies). Next, you can do one of two things. You can drag the application that you see in that list into the Applications folder, and then open that folder to be sure that it is there (and run it from there).
If that didn't work, you probably dragged a DMG file to the Applications folder, and it will open the install folder again. From within the install folder, you can drag the picture of the application directly to the Applications folder. (Many DMGs include an alias of the Applications folder on the disk image, so you can just drag the program onto the alias right next to it.)
One of those two things should fix the problem. After that, I you can get rid of all of the DMG files, so that you never accidentally have the problem again.
[robg adds: John's article isn't online yet that I can see, but it was based on this column from his site. Having worked through this personally with many switchers to the Mac, I agree with John that the concept of a disk image can confuse users, especially those new to the Mac.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20091219103751673