Computers have two kinds of storage space. The hard disk drive, flash drive, or SSD is long-term storage that retains data even when the power is off, stores the Mac OS (operating system, what makes it all work), and holds all of your applications, data files, music, pictures, and so forth. This semi-permanent storage (hard drives and SSDs both can and do fail, which is why we recommend backups). RAM is kind of like a scratch pad, where the computer puts everything it is working on right now. The RAM is forgotten when you shut down. All your work is saved to the internal storage (HD/SSD).
If you are retouching a photograph in Photoshop, it will be much faster if the computer can read the entire photo off of the hard disk and into RAM at once. If you don’t have enough RAM, the computer will have to keep constantly swapping data between the hard drive and RAM, and things will operate more slowly. Data in RAM can be manipulated very fast, while reading and writing to a hard drive is much slower.
The SSD / Flash drives that come with newer Macs are much faster than hard drives, but they still are not as fast as RAM. It is still to your benefit to get as much RAM as you can if you work on large documents frequently.
Whichever type of drive you have, it’s easiest to think of it as your filing cabinet, and your RAM as the desktop you actually do work on. The more storage you have in the ‘filing cabinet’, the more files, apps, music, etc. you can keep on your Mac. More RAM will give you more ‘desk space’ so you can work on more and larger files.