Part of the confusion begins with people not beginning with a grasp of the distinction between memory and storage space. If you don’t have that down, virtual memory isn’t going to make much sense either.
Let’s look at one of those early personal computers to which ftg refers.
It has RAM chips, and when the computer is on and running information can be loaded into these chips and it said to be “in memory”. This is not storage space; it isn’t on your hard disk and it isn’t competing with installed programs and document files for available empty megabytes, and if you shut down (or rip the plug out of the wall) the electricity stops running through these chips and whatever information was there in memory goes away like the picture on your TV set when you turn the TV off.
Meanwhile, it also has a hard disk, on which is stored your operating system, your various installed programs, and your document files. This is not memory; in order for your computer to use any of it, it has to be read (copied) into memory. If you have an existing Word document, “Letter to Dad”, and you open it, it gets read into memory, and if you make changes to it and save your changes, it gets re-written to disk based on the copy in memory which includes the changes you made. Your hard disk storage space isn’t affected by how much stuff you try to run at the same time, and if you run out of memory and get an out-of-memory error message when you try to launch Excel after already having Word and Netscape and Hearts Tournament and a dozen other programs open, throwing away a bunch of documents on your hard disk won’t help a bit. What you need to do instead is quit some programs so as to free up some RAM. Inversely, if you go to install a new program and it says you don’t have enough space on your drive, quitting Word and Excel won’t fix the problem.
OK, now jump forward a few years and add in a new complication, virtual memory. Storage space is available in larger quantities than RAM. You’ve got several gigabytes of empty hard disk space but only a gig or less of total RAM, much of which gets filled up by your operating system, the programs you’ve already launched, and the documents of those programs as you open or create them. So…what if we cheat? When you’re in Word, we’ll take a chunk of RAM that’s occupied with bits and bytes of Netscape and we’ll write it to hard disk and clear up that RAM to use for other things, then if you switch back to Netscape, we’ll swap and write a chunk of something else to hard disk and read back the Netscape stuff so you can use it. This is a “swap file”, and our use of it is “virtual memory” — it isn’t real memory, it’s phony memory or virtual memory, it’s really hard disk storage space masquerading as memory.