You can think of .DMG files just like a CD or floppy disc; when you double click on them, it's like inserting the disc. Once the disc is "ejected", you can do whatever you want with the .DMG--if you don't need the "original disc" anymore (for example, you've already copied the application on it to your Applications folder, as mentioned above), then you can toss it. If you want to save it for archival purposes (for example, you might want to reinstall the software without downloading it again), then you should file it somewhere on your hard drive (or backup disk or whatever).
One tip that new users often seem to miss when installing software, though: You need to actually drag the application from the window that appears when you mount the .DMG "disk" into your applications folder to copy it there. You can run it directly from the .DMG file, but this isn't really the way they're intended to be used.