Credit card companies multiply your current balance by a daily rate to come up with the daily interest charge they charge you for the credit card use.
They then add that interest charge to your credit card balance the next day.
If your credit card has an APR of 15%, it will have a daily rate of .041096%
To avoid paying to high of interest on your credit card it's best to pay off as much as the balance as possible on the credit card and if possible pay off the full amount of the balance each month or after you use the credit card for purchases.
Paying off the full balance on your credit card or paying more than the minimum payment on the credit card each month will help to build your credit rating much better than just keeping a high balance and paying the minimum.