macOS has very efficient memory management. It will automatically allocate memory and adjust the contents of memory as needed. This information can be viewed in the Memory pane of the Info toolbar item.
Physical Memory: The amount of RAM installed.
Memory Used: The amount of RAM being used and the amount that's immediately available.
Wired Memory: Memory that can't be cached to disk, so it must stay in RAM. This memory can't be borrowed by other apps.
Cached Files: The size of files cached into unused memory to improve performance.
Swap Used: The amount of space being used on your startup disk to swap unused files to and from RAM.
Page ins/Page outs: This refers to the cumulative amount of data moved between RAM and the storage device in your Mac.
Tip: Page outs occur when the Mac has to write information from RAM to the storage device (because RAM is full). Adding more RAM may reduce page outs.
Active: This information is in RAM and has been recently used.
Inactive: This information is in RAM, but it is not actively being used; it was recently used.
For example, if you've been using Mail and then quit it, the RAM that Mail was using is marked as inactive memory. Inactive memory is available for use by another application, just like available memory. However, if you open Mail before its inactive memory is used by a different application, Mail will open more quickly because its inactive memory is converted to active memory instead of loading it from the slower storage device.
You can use the Purge button to remove the information in the inactive memory.
While purging the inactive memory, the Finder may slow down and not respond for several seconds.