That's the whole idea of a VM, it "sandboxes" the guest and avoids issues with the host OS. Developers use VMs all the time for testing apps, not just so they can test the apps on different versions but also so they don't hose their main OS.
It should, unless its buggy, then the ram may not get released. I use Vmware and all the resources it consumes while running are released when I'm done.
I like using Vmware because as stated, it can create multiple operating systems that are sandboxed, there's little risk of one impacting the host OS.
The guest OS is usually contained inside a "VHD" or Virtual Hard Disk, removing the guest OS would be as simple as deleting the VHD file. Again, that's one of the points or benefits of using a VM, it's self-contained and isolated from your main OS.