Money has played a central role in the development of human societies. It acts to solve the main problem with bartering: that the person that has the thing that you want doesn't want any of the things that you would be willing to give them in return. For example, a fisherman may have had a lot of fish that he wants to trade for a pair of boots but the person making the boots doesn't want any fish. This is where money comes in: money is something that both parties want as a store of value that they will then be able to exchange for something that they actually want at a later point in time. To get back to the example: the person that made the boots may not want any fish but with money they may be able to instead buy an axe. To be useful at its purpose money needs to have the following properties:
- Fungibility: Each unit of money must be able to be used in the same way as another unit. With this property humans need to only care about the amount of money rather than its quality.
- Durability: Money must not (easily) break while it's in circulation, either due to handling or because of decay.
- Divisibility: To enable the purchases of low-value items must be able to be divided into small units.
- Portability: Money must be easy to carry around or else it would be very difficult to transfer it from person to person or to carry enough for a high-value item.
- Acceptable: Most people must accept the money as payment or you wouldn't be able to buy anything with it. The money must be either valuable in and of itself or its value must be guaranteed in some other way, for example by a government.
- Scarce: The supply of money must be limited or else it would quickly deteriorate in value, leading to inflation.
Historically coins made from precious metals such as silver have been used as money. Eventually human societies switched to representations of those metals in the form of paper money (look up gold standard for more information). Nowadays most currencies are not backed by anything except the governments that issue them (fiat currency). When said governments lose power, so does the currency. For example, after Germany lost the Second World War the Reichsmark quickly decreased in value. Instead people in the occupied territories started to use cigarettes as money.
Now to get back to the original question: what would have happened if barter had remained the only way of payment? The answer is that the division of labor present in advanced human societies would have been impossible. The more specialized a human is the more things do they need from other humans to survive and the more other humans do they need to provide their goods or services to. A farmer that is mostly self-sufficient and only occasionally needs some new tools may have been able to get by with bartering but it would be basically impossible for a software developer to trade some of his labor for a morning coffee. So in conclusion, with just bartering human societies would have remained very small with only a small degree of specialization - but with the sheer utility that money provides it seems almost inevitable for human societies to develop it.