In short: Barter is the direct exchange of one good or service for another good or service, with no money passing between the parties.
Simply put: A swap needs a "double coincidence of wants": the other person must have what you want and want what you have. Barter has no common measure of value, is hard to divide and does not store value — an apple goes bad. Money solves exactly these problems.
Example: A hairdresser cuts a teacher's hair (a €20 service) and he gives her an hour of maths tutoring (also €20). If she does not need tutoring, the deal does not happen — with money it would.
Watch out: Barter is not "free": it costs time, carries the risk that the other side will not deliver, and makes a fair valuation hard. It is also generally a taxable transaction, even with no money changing hands.
Example: Bulgaria — under the VAT Act every supply for consideration is taxable (art. 2, point 1), and in an exchange each of the two supplies is taxable (art. 26(7)–(8)). Source: https://lex.bg/laws/ldoc/2135533201
Check in your country — ask your tax authority how barter is treated for VAT and income tax.
Source: Bank of England, "What is money?" — https://www.bankofengland.co.uk/explainers/what-is-money