In that case, money is a medium of exchange
in the past, we use barter (exchanging goods) system to require new goods.
For example, if i want a fresh bag of potatoes, i will give you a dozen of eggs.
Now, we use an intermediary called money for trading to avoid inconvenience in barter ( some time an equal value)me the goods that was exchanged in barter dont have an equal value.
This intermediary is called medium of exchane