Virtual memory allows programs to use virtual addresses rather than real memory addresses. When a program is executed, the virtual addresses are translated to real addresses. Virtual memory was developed in the late 1950s and early 1960s to overcome memory limitations and allow timesharing of limited main memory among multiple programs. It provides the illusion of a much larger memory space than what is physically available.