A virtual machine is a model of a computer, implemented in software (and in some cases, undoubtedly, in hardware). Sort of like an computer inside of a computer.
The point is, however, that the virtual machine doesn't need to be like the host system, or run the same operating system; indeed, the virtual machine might not even have a real-world counterpart.
Some examples of what VM can do:
- Providing something that looks and feels like a real machine to an instance of operating system. This type of virtual machine is used in mainframes - you can run thousands of copies of Linux in a single IBM S/390 mainframe, and each behaves like a single machine.
- Providing something like a computer model for a single process, but has restrictions for security reasons. This is sometimes called a sandbox. Examples could include Java Virtual Machine (JVM).