If the image contains an installer, then once you've installed the app you can safely eject the image and then trash it.
If the image contains the app file itself, you should copy it somewhere (such as to the Applications folder) and then you can eject the image. If you drag the icon straight from the image to the dock, then the image will get mounted every time you launch the app. Your post's a bit vague but I'm guessing that's what's happening.