A swap file is a special system file into which Windows writes data from RAM when it becomes insufficient for the operating system to work correctly.