Search for the definition you are looking for.
Commodity swaps enable both producers and consumers to hedge commodity prices. The consumer is usually a fixed payer and the producer a floating payer. If the floating-rate price of the commodity is higher than the fixed price, the difference is paid by the floating payer, and vice versa. Usually only the payment streams, not the principal, are exchanged, although physical delivery is becoming increasingly common.
Swaps are sometimes done to hedge risks that cannot readily be hedged with futures contracts. This could be a geographical or quality basis risk, or it could arise from the maturity of a transaction.