The operating system makes part of the storage drive available to use as RAM. Virtual memory is much slower than main memory because processing power is being taken up by moving data around, rather than just executing instructions. The guide on operating systems explains how the OS manages memory.
Latency is increased when the computer needs to use virtual memory.
Swapping (also called paging) is the process the OS uses to move data between RAM and virtual memory. The OS moves data from processes that are not immediately needed out of the RAM and stores them in virtual memory. It copies the data back into RAM when the process is needed again.
Using virtual memory slows the computer down because copying to a hard disk takes much longer than reading and writing RAM.