Let me add to what @randolf has said. If you do not carry a trade properly you won't earn any interest, in fact you will be debited for the interest rate differential instead.
Whether you earn overnight interest on a carry trade depends on if you are buying or selling the currency pair.
In @randolf's example, USD/ZAR interest rate is 4.5% vs 7.25% so to earn interest you must sell the USD/ZAR pair and leave the trade open overnight.
If you go ahead and buy USD/ZAR overnight, you will be debited instead because you are borrowing ZAR to buy USD, meaning you are borrowing ZAR with higher interest to buy USD with lower interest.