Lets say there is a carpenter who needs rice for food. The carpenter must find a person who has more than enough rice, but also simultaneously wants his services. This is called double coincidence of wants, as both people need to want the things that other person has. This is pretty difficult to do, and is one of the main problems in a barter system.
Its quite obvious that it will be beneficial to have something that holds value. Lets call this something as X. So that the carpenter can sell whatever things that he makes and sell them for some X. Then he can go to the farmer and buy the rice and give him X. The farmer can then find somebody who will take this X and sell him something that he needs.
This X is called Money. It can be anything. Obviously to be of most use the item X should not have any quality issues, ie all instances of X should be equivalent.
Money has 3 functions, lets look at them closely.
1) Unit of Account (UoA): Money should be able to quantify the value of each object. To do this the money should be accurately measurable. eg. if a gold coin is money, then we can measure the value of all objects in multiples of the gold coin. Nowadays Paper Currency notes serve as the UoA. An important requirement is that the value of the money item should be relatively stable. If the value of the item used for money fluctuates a lot, it cannot serve the function of UoA very effectively.
The best way to keep the value of money stable is to have a central bank follow the price of everything and see how it varies. Then it should modify the money supply to keep the value of money stable. Basically increasing the money supply reduces the value of money, and reducing the money supply increases the value of money. Paper money fulfills this property best as it is infinitely printable. Anything that cannot be printed at will cannot fulfill this property very well, as it will not be completely flexible for Central Bank.
If the value of money is very stable, people start storing it for future use. This makes it difficult for the central bank to determine the effect of money supply. Basically the money supply is only completely effective if all the money is in the market. If some of the money is not in the market and is being saved by the people, then the central bank must increase the supply for the same effect. This saved money will eventually arrive in the market, and possibly at an inopportune moment and cause the central bank to lose its control of the value of money.
Because of the stability of money value tends to make its future unstable due to the tendency of people to store it, no UoA can be stable in the long run. The central bank should strive for a slow inflation, so that people are discouraged from storing the UoA.
2) Medium of Exchange (MoE): The function described in the beginning of the article is basically MoE. The Money should be exchangeable for any product or service. It should be what is called a legal tender. This means that everybody is bound by law to accept this form of money. This money is also called currency. For a long time Paper Currency notes have been used for this purpose. Before Gold and Silver coins were also used.
In most of the cases MoE is also the UoA, except in the case when there is a loss of confidence, and an external currency is used for UoA, and the local currency is used for MoE.
3) Store of Value (SoV): A SoV item should keep its value for a long time, so that people do not lose their wealth through lost value. SoV items need not be accurately measurable or that all their instances be equivalent. SoVs should be least affected by production. Another important property of SoVs, as these are meant to be stored for very long times, is that these should not be used in industry. Otherwise the industry will face artificial shortages, because of the hoarding. The best SoVs are rare items, like antiques and objects of fine art. Some metals like gold and silver that are very low in earth are also good SoVs. Silver is slowly becoming bad for SoV as large scale industrial applications have been developed. The SoV should never be in the govt control, otherwise it will not be able to store Value for the long term.
In all the 3 functions of money, it is very good if the items used for money, are not useful in other ways.
In most of recorded history, gold or silver have served all three monetary functions. During the last 100 years slowly paper money became important and lately since 40 years it has fulfilled all three monetary functions.
During a hyperinflation the 3 uses of Money trifurcate. A foreign stable currency becomes the UoA, as the local currency is too unstable. The local currency remains as the MoE, as it has legal force behind it. The foreign currency can fulfill the role of SoV, but it generally is not available in quantity. This forces the people to buy anything and everything physical as SoV. Even the most mundane things for example Toilet paper becomes a SoV.