The primary function of memory in use in the different types of computers is to store data and depending on the type of access that the typical system has to the data the memory is further classified into the following.
RAM: The Random Access Memory is where the software that gets to operate systems and programs are stored for use. It is necessary to have a system that made for easy as well as fast access to data and that is what the RAM does. Once the computer is shut down, the RAM looses the data stored in them and is returned to a state of complete erasure. Thus each time the system is started, the RAM has to be loaded to help carry out the various functions that needs to be performed.
ROM: This bit of memory is what is located at the heart of any motherboard. It is not easy to erase this bit of data and is necessary to start off the computer after a shut down. The ROM initializes the loading of the necessary files to the RAM and starts of the actual working of the computer. It thus is the key to a system and its efficient functioning as well. This is also referred to as the flash memory.
Hard Drive: Often called the secondary memory, the hard drive is what often is referred to when people speak of storage capacity of a computer or even a server. Most files like movies, songs, and the likes are stored in this space that is so integral to the functioning of a computer. The hard drive can be erased and matter copied over several times and the very nature of the technology that goes on to be used in the hard drive is in fact as old as the computers itself.
Thus the above three are what constitutes the memory of a computer system and each has a specific function that brings the advantage of the particular form to use each time. It rarely is possible to substitute one type with another without compromising on the cost factor and the need to be as cost effective as is necessary makes it important that the specific hierarchies are kept without breaking.
The best systems have a role that is at best a balance of the strong points of each separate form of memory and that which gives the optimum output as well.