In barter system, where goods are directly exchanged without the use of money, double coincidence of wants (i.e. a person desires to sell exactly what the other person wishes to buy) is an essential feature. But it, indeed, is a very cumbersome process.
By serving as a medium of exchange, money removes the situation of double coincidence of wants and the difficulties associated with the barter system. For example, it is no longer necessary for a shoe manufacturer to* look for a farmer who will buy his shoes and at the same time sell him wheat. AH he has to do is to find a buyer for his shoes, who will exchange his money for shoes. Now, he can purchase wheat or any other good in the market with the help of the money earned. Thus, the problem of double coincidence of wants gets solved with the use of money.