Swap is a space on a disk that is used when the amount of physical RAM memory is full. When a Linux system runs out of RAM, inactive pages are moved from the RAM to the swap space. This tutorial explains how to add a swap file on Ubuntu 20.04 systems.
Source: LXer – How to Add Swap Space on Ubuntu 20.04