The vast majority of commodity swaps involve oil. So, for example, a company that uses a lot of oil might use a commodity swap to secure a maximum price for oil. In return, the company receives payments based on the market price (usually an oil price index).
On the other side, if a producer of oil wishes to fix its income, it would agree to pay the market price to a financial institution in return for receiving fixed payments for the commodity.