RAM is used to store data temporarily. It's a form of memory that stores detail your computer inevitably requests for access promptly. This includes the files you are currently working on, the web pages you have open in your web browser, and temporary files created by programs running on your PC.
For example, when you're editing photos in Adobe Photoshop, RAM allows you to work with large image files without having them load from storage all at once. This way, if something goes wrong during the process (like accidentally deleting some pixels), it's easier for you to recover than if it had happened while trying to load an entirely new file instead!