Virtualization is a means of running a guest operating system in host OS. Virtual Machines (VM) can be created in a virtualization program, almost any OS can be installed in a VM. A system running the VM is usually called the host and the OS running the virtual machine is called the guest.
Virtualization and emulation should not be confused with each other as they are both very different things. Emulation is the replication of how hardware operates either on a low level or a high level. Whereas virtualization is running an OS on existing hardware that can already run the operating system.
Usage of a VM can be used to combat compatibility issues with newer operating systems, such as when the program might require some certain functionality that has been removed.
One of the best examples of this is with 16-bit backwards-compatibility software support in Windows, which is not supported in the 64-bit variants of Windows. However, 32-bit variants of Windows still support 16-bit applications natively. virtualization also has plenty of other usage cases such as: running an isolated environment (sandbox), running older software or a different OS without dual-booting the host machine.
A lesser-known form of software distribution is called application virtualization. Programs like Cameyo client, Turbo Studio, and VMware ThinApp can be used to isolate applications files and/or registry keys from the host machine including the ability to make programs completely portable between different computers or system configurations. Instead of the entire operating system being virtualized as with a typical VM, only the application's files and/or registry keys are virtualized and bundled together. This method typically follows a container approach to isolation. For example; An application that requires the Microsoft .NET, Visual Studio C++ runtime or other middleware components can have the runtime either bundled within the application itself or added as an SVM (in the case of Turbo Studio) instead of having to be natively installed on the host machine. Isolation options include being able to merge with the entire existing system,select parts of it, or to be completely isolated and much more depending on your knowledge of the software. The software required to make virtualized applications can be expensive though due to the obscurity and specialty of the technology. Most components of virtualization will require an advanced-level of knowledge of the Windows operating system to use and operate successfully.
Another type of virtualization is called a compatibility layer, running a Windows application on Linux through Wine can offer better compatibility for older programs than newer versions of Windows itself. However, Wine Is Not an Emulator (W.I.N.E) and is classified as a compatibility layer (a.k.a translation layer).
With gaming, some problems may arise. When running a VM, or when using a hyper-visor, it will take more resources to run than when the OS is running natively. Emulating an entire machine including its hardware can be near impossible due to how costly it is compared to virtualization (for example; QEMU). 3D accelerated games may also have problems in VM’s as they aren't designed for gaming, so 3D acceleration support is generally poor.
When running an older version of an OS in a VM, the same security risks apply when installing & running that OS natively, so there will always be a possibility of viruses and malware that can take advantage of the guest OSes vulnerabilities; even of the VM software itself. If the software in question does not need access to internet, it's usually safer to disable all connections from the VM to the host computer. When using shared folders, it's safer to marked the folder as read-only if you don't need to move files to the host. Taking all of these security measures into consideration can make running a guest OS a lot more secure.