Virtual memory allows processes to have a virtual address space larger than physical memory. When a process accesses a page not in memory, a page fault occurs which is handled by reading the requested page from disk into a free frame. Page replacement algorithms select a victim page to replace when there are no free frames, such as FIFO which replaces the oldest page. The optimal page replacement algorithm OPT replaces the page that will not be used for the longest time in the future but cannot be implemented as it requires knowing the future.