Computer memory is fast, but quite expensive. It is also volatile (the data is lost when the computer is switched off).
Computers use secondary storage to store larger amounts of data, and also to keep data permanently, so it isn't lost when the computer is switched off. The most common form of secondary storage for PCs is the hard disk drive (HDD). For mobile devices, Flash memory is more suitable.
Typically, all applications and data are kept in secondary storage. The code and data is copied into memory when the application is opened.
Copyright (c) Axlesoft Ltd 2021