It depends what you want to get. If you need just the VM software, it's mostly free (Virtual Box, Hyper-V, VMware Workstation). If you are talking about VMs with installed OS - they're not different than a standard computer - you install Linux, or Windows inside them, and use them.
As for Windows - you can download fromMicrosoft fully functional Hyper-V virtual appliance with installed Windows 10 and development tools, good for (I think) three months.