A swap is a legal commitment between two parties to exchange cash flows over a pre-specified period. For a standard IRS the amount payable at each scheduled date is fixed at the onset of the agreement for one of the party (the fixed payer), while it is variable (floating), for the other party. The floating payment will be indexed to one of the points on the yield curve for interest rate swaps (say 3 month Libor) or to an equity performance for equity swaps.

In an IRS, Party A could be entering into the swap to hedge its interest rate exposure. For example, if A has borrowed money from a bank and needs to repay interest on that amount based on a floating rate, entering into a swap with B allows A to be protected from any adverse movements in interest rates, as its payments are fixed from the start of the swap.

Party B could be entering into this swap agreement on the assumption that interest rates will move favorably, in its case if interest rates fall over the period of the agreement. It is also possible that B has fixed-rate obligations (for example if it has issued a bond promising to repay a fixed rate to investors), but earns a payment based on a floating rates from its investments. Entering into the swap allows B to retain anything it makes from its investments above the floating rate.