Virtual memory allows processes to execute even if they are larger than physical memory by storing portions of processes on disk. When a process attempts to access memory that is not currently loaded, a page fault occurs which brings the required page into memory from disk. This is known as demand paging and allows the operating system to efficiently load only those portions of a process needed for execution, reducing memory usage and improving performance compared to loading the entire process at once.