When you pay more than what is due on a loan -- i.e., when you pay some amount that is greater than the amount of accrued (earned) interest at that point -- the excess will go to principal, because it has nowhere else to go.
If that doesn't make sense, let me clarify something -- when you take out a loan and sign a periodic payment contract for that loan, the monthly payment amount they come up with includes the amount of interest due at that time, plus however much principal needs to be paid off in that particular month to have the loan come out to whatever term you agreed to (e.g., 60 months, 48 months, or whatever). Sure, you'll owe more interest in the future, but it hasn't accrued yet, so they're not entitled to it yet -- and any extra money you pay right then will go to principal.