You have to configure it to use "Undo Disk" (??) I think that is the term.
That will allow you to close the VM and have it undo whatever it did,.... But if you did not do that,, you could simply delete the Virtual Machine and then run the XP Mode install again and start from scratch,,,, so, yes it can be done.
BTW,, whatever you do in the VM, as long as it is not a virus that could spread via the network, will not affect the main Win 7 system.
An alternative is Sun VirtualBox. Which is free. Same concept.