The short answer to this question is that the rest of the application remains on disk. In other words, disk acts as the backing store for RAM; a slower, larger storage medium acting as a "backup" for a much faster, smaller storage medium. This might at first seem to be a very large performance problem in the making -- after all, disk drives are so much slower than RAM.
While this is true, it is possible to take advantage of the sequential and localized access behavior of applications and eliminate most of the performance implications of using disk drives as backing store for RAM. This is done by structuring the virtual memory subsystem so that it attempts to ensure that those parts of the application currently needed -- or likely to be needed in the near future -- are kept in RAM only for as long as they are actually needed.
In many respects this is similar to the relationship between cache and RAM: making a small amount of fast storage combined with a large amount of slow storage act just like a large amount of fast storage.
With this in mind, let us explore the process in more detail.