A virtual machine (VM) is a program which emulates a computer system. It has a virtual CPU, memory, and storage and appears, from the outside, to be no different than a physical machine with the same hardware.
A virtual machine has an operating system, files, and applications. It works just like a physical computer; it can host websites, run programs, and exist on a network with other systems. If viewed on a screen, the virtual machine appears as a window running within that computers own operating system.
It also has a CPU, memory, and storage, but these are simulated, not physical. Because of this, multiple virtual machines can coexist on one server. When this happens, the server uses a piece of software called a hypervisor to manage them. The hypervisor maps the VM’s virtual hardware to the physical components on the server.
In this scenario, one physical server might have two, three, four, or even ten virtual machines running on it. However, the number is limited by the resources of the server – too many VMs will lead to reduced performance.
The nodes on the Ethereum network all run the Ethereum Virtual Machine (EVM), which is used to execute smart contracts. Because this happens in a separate sandbox, it provides considerable security benefits for the Ethereum platform, making it immune from the DDoS (Distributed Denial of Service attacks that are a go-to strategy for many hackers.