Your Mac comes with a set amount of physical memory applications can use. Your running programs, open files, and other data your Mac is actively working with are stored in this physical memory. But that’s a simplification—applications can also use “virtual memory”, which your Mac can compress and temporarily store on disk.
Source: How-To Geek