Swaps is an Over-The-Counter Derivative contract wherein, cashflows will be exchanged between the counterparties as per the agreement.
Example, one party might want to exchange fixed interest rate (say 4%) for floating interest rate (say LIBOR).
X might that LIBOR rate will go up and so, will enter into a Swap agreement will Y, wherein, X will pay fixed rate to Y and in return, Y will pay LIBOR return.
Both the parties will have opposite views which will bring them together in an agreement.