If I have apples and want grain, I have to find someone who has grain and wants apples. Alternatively, I can engage in a series of intermediate trades that ultimately result in the exchange of apples for grain.
In primitive societies with a small range of goods, barter can work well enough, but as the range of goods expands, barter becomes increasingly inconvenient and costly. Several considerations have affected the evolution of commodity money itself--from cattle and grain toward shells and then bronze and ultimately to silver and gold.