Virtual memory is also known as swap space. When the system needs ram, it takes programs in memory which aren't doing anything, and writes the ram they use onto the hard drive, freeing up real ram for currently running programs.
Compared to ram, virtual memory is disgustingly slow, programs simply don't run from the disk, they need to be reloaded into ram before they can run again.