Virtual memory allows processes to execute even if they are larger than physical RAM. It does this by dividing programs and RAM into pages and page frames, using a technique called paging to store pages that don't fit in RAM on disk. When a process tries to access a page not in RAM, a page fault occurs and the system works to load the needed page from disk into an available page frame.