Two concepts you must know: Rollover and Carry trade
In forex trading positions are often kept open for more than a day. That is why it is useful to discuss the concept of rollover. The latter is the interest accrued or charged at midnight for keeping the position open overnight.
When a trader is short the currency with the higher interest rate (in the pair), his account is charged for holding the position open overnight. In the opposite case, when a trader is long the currency with the higher interest rate, the rollover is added to his account.
Providing an example will make things clear. Let us take a pair with bigger interest rate differential like EUR/NZD, for example. The current official cash rate of the Reserve Bank of New Zealand is 3.50%, whereas the main interest rate of the European Central Bank is 0.15%.
If a trader is long EUR in this pair, it means that he is short NZD. Since the interest of the New Zealand dollar is much higher compared to the one of the euro, the trader will have money deducted from his account each time he keeps his long EUR/NZD position open overnight, i.e. his rollover will be negative. In case one decides to have a short EUR/NZD position open overnight, interest would be accrued to his account.
It looks tempting to keep a position open for a longer time and earn interest each day. In fact, there is a strategy known in the financial world as carry trade, and it is based exactly on this positive rollover concept. It is that simple: you are long the higher interest rate currency and short the currency with the lower interest rate. In our example, you want to be short EUR/NZD in order to take advantage of the interest rate differential. By doing that a trader earns interest for each day he keeps his position open overnight, no matter if the pair is moving up, down or sideways.
Of course, it would be much better if you choose a pair in a trend which favors the direction of the carry (speaking about EUR/NZD that would be a downtrend). In this way, you will be making money both from the pair movement and from the interest added to your account every single day. Gains will be proportional to the size of the position. However, it is always useful to keep in mind that trading on margin entails a high risk, and a trader should always calculate and decide how big a position he can afford to open and keep.