A medium of exchange is a function of money that expedites trade between a buyer and seller because it is widely accepted as payment for a good or service. Most societies use their currency, but stones, salt, gold, and tobacco have been used as a medium of exchange.
Most economies use their currency as their medium of exchange because people recognize its value. Businesses and people accept money because they know they can exchange money for other goods and services. A medium of exchange should have a standard value so comparing values between goods and services is easy. Currency in and of itself has no value. You cannot eat or wear currency, but you can use it to purchase food and clothing because sellers accept money as a medium of exchange.
The efficiency gained by an economy with a medium of exchange is easily understood when compared to an economy relying on barter, where traders exchange goods and services without money. An individual would need to identify something they offer that the other party needs before negotiating a trade. For example, if I am a dairy farmer and need a coat, it is much easier for me to purchase a coat paying money than it is to search for someone else who has a coat my size and is willing to trade for my milk.
Usually, a unit of exchange evolves in an economy. Initially, it may be a commodity that everyone finds value in. For example, tobacco was used as currency in Virginia and North Carolina during the 1600s because English currency was in short supply and everyone knew they could easily trade their tobacco.
Ideally, a medium of exchange should be easily carried, durable, divisible, and not be subject to wild fluctuations of value.