Some people just keep forgetting things like homework, chores, or where they put the onions. Okay, he is more lazy than forgetful. But people have a special part of the brain for storing information. Without it, you continually need to relearn how to do things, even simple tasks, like cutting onions, usually, and works pretty well. This stored information is your knowledge and experience and serves as a starting point for whatever you do. Computers also possess memory. Without it, they would forget everything as well.
Computer memory can be divided into two types, short term and long term memory. Short term memory is used to store information as long as the computer remains on. There are two main types of short term memory, cache and RAM. Cache is the smallest type of memory. It stores minimal amounts of data in the microprocessor, it can be accessed very quickly. As soon as the cache is full, data is transferred to the ram, the random access memory, the memory is reset and emptied once the computer is switched off. Long term memory can be thought of as storage. This is used to store files and programs over a longer time. Long term memory can be divided into two types as well. Permanent and modifiable. Most CDs and DVDs don't allow any changes once the information is saved. Well other storage hardware such as USB sticks and hard drives can be constantly changed.
You can think of a computer's long term and short term memory like a kitchen. The computer's processor is like a chef who works to prepare the food. The faster the chef, the faster food gets cooked. The computer's RAM is like the worktop. While his hands represent the cache. He can use tools in his hand, but as soon as his hands are full, he needs to place some things on the worktop. The more RAM or cache, the easier it is to get the job done. The computer's hard drive is like the refrigerator. It stores the ingredients until the chef needs them. If space runs out, you need to throw some things out. storing and accessing data is a routine task for computers. They do it automatically, at least as long as they are working properly.