A rate swap is the exchange of cash flows on underlying principals which are not exchanged. It is an over-the-counter contract between two institutions to trade the cash flows on two comparable principal amounts, but not to exchange the actual principal amounts.
Institutions might prefer this arrangement because they only have access to floating interest rates or are overweight in them and would prefer to have some fixed rate interest cash flow, or vice versa. These swaps might occur between banks on opposite sides of the world to take advantage of rates elsewhere or to simply diversify their risks.