A Swap file is a space on a hard disk used as the virtual memory extension of a computer's real memory (RAM). By using a swap file, a computer can use more memory than what is physically installed in the computer. It is a file or space on the hard drive where data from RAM is "swapped" in order to preserve space.When you move back and forth between the programs, data is swapped from the RAM to the swap file and back again.