SWAP operation is rollover to the next day. It is carried out on a worldwide scheme with involvement of countries’ interest rates. Forex market works on SPOT conditions. This means that all the transactions concluded in the current working day, must be carried out throughout the supply of the same amount of currency on the second business day.
To avoid this supply, it is necessary to make the transaction of SWAP type (ie, close and re-open a position at the current rate), which allows you to settle the obligations of the parties.
Each country has its own interest rate based on its central bank’s decisions. Different countries - different rates, and this difference can be very significant (for example, the interest rate on USD several times more than on JPY).
What does that mean? For example, when you make a deal to buy USD for JPY, then actually you get currency (USD) with a higher interest rate, and instead give another currency (JPY) with a less one. The minimum term of bank loan is one day and even for such a short time, banks charge interest on the amount of money being used in your work.
In this example, when you bought a USD for JPY, the bank will pay you extra for every day while you are in this position. Conversely, if you sell USD for JPY, you will have to pay extra for each bank rollover to the next day.
For the calculation of how much and when you will pay to the bank (and vice versa), there is a special table in the section of trading conditions (check SWAP subcategory). Keep in mind that central banks of all countries periodically change interest rates and, therefore, the values in this table will change over time.
For the understanding of the table you should consider another common formulation: if you bought a currency, you have formed a "long" position and if you sold the currency, then you have a "short" one.