It works just as it sounds. You create a virtual machine. A PC within your PC. It runs from within your current install of Windows. you give it space, give it resources to use and install Windows to test it out.
Definition:
program for sharing computer resources: a program running on a computer that creates a self-contained operating environment and presents the appearance to the user of a different computer. A virtual machine simulates at a minimum the instruction set of the computer it emulates