You can obtain Windows 7 or 8.1 ISO images for free and legally. Or use Windows 10 Preview. Do not use Windows XP.
Choose either VirtualBox or VMWare Player. Please be aware of any incompatibilities with security software.
Running malware on a test system, or virtual machine is dangerous to systems on the network and, or attached peripherals.
You should acknowledge that you are fully responsible.
Check the Malware Talk section for related threads.
Installing an OS inside a VM is easy, look up their how to or Google it. And don't bother with activation, a reinstall can be done instead.