There are different ways that VMs can be implemented, so the answer varies.
Some require support from the host OS. However, today the predominant method
uses specific hardware extensions that manufacturers like AMD, Intel have implemented in their chips. These allow
the guest OSs to run at pretty much a similar speed with negligible performance hit., by giving the
guest OS's kernel access to the CPU much like the host OS's kernel has access. You'd really need to read up on
these extensions, and
wikipedia helps somewhat, but
probably needs a textbook to do it justice (I'm no expert on this).