Most people assume that this points to a problem with the DMG file(s), but this is not always the case. While the Finder refuses to mount these files (a reboot is the only solution to the problem I could find), you can still mount these files from the command line using hdiutil, run as root:
$ sudo hdituil attach file name.dmg
Replace file name.dmg with the name of the disk image file. This will properly mount the DMG files, which can then be unmounted normally using the Finder. Failure to mount DMG files has been a real problem for me, and I am surprised this issue has not been fixed. Having to mount DMG files as root points to a permission problem to me.
[robg adds: I haven't personally experienced this one, but Apple has a kbase article that implies it could happen on pre-10.3.2 systems. Their only listed solution is to upgrade to 10.3.2 or newer.]

