Paying back a loan is a lot like renting something.
You can think of interest rate as the rent that money costs. It's like hiring someone else's money and having to pay a salary to that money. When talking about money, the salary is often given as a ratio between how much you borrow and how much you have to pay back. The name for this number is "interest rate."
For example, if you borrow $10,000 and have to pay $3,000 a year for not paying it back, your interest rate is $2,000 divided by $10,000, which is 30%. Simple?
That's if the amount of money you borrow stays the same, say $10,000. If you don't pay your interest, the $3,000 is added to the total amount you owe. So you owe $13,000 the following year. You'll owe $16,900 in two years. Got it? This is one of the few functions in math that grows faster than an exponential function.
If you borrow money from a credit card company at a 30 percent interest rate and from your mortgage company at a 9.9 percent interest rate, you will pay more to the credit card company for every dollar you don't pay back.
Each dollar you borrow from a credit card company costs you 30 cents per year, while each dollar you borrow from your mortgage costs you 9.9 cents per year.
Think about it like this. Say that each dollar you owe is like one of your workers. You pay your creditor for using their money in the same way that your boss pays you for using your time. You should, of course, try to get rid of the employee who makes the most money first. Why rent money for 30 cents a year from your credit card company when you can rent money for 9.9 cents a year from your mortgage company?
Say, for the sake of simplicity, that a dollar from a credit card company is the same as a dollar from your mortgage. You would want to pay less salary to the credit card company, right? So you should first pay off your credit card.
If you owe $30,000 to a credit card company and $30,000 on your mortgage, and both payments are the same, it will cost you less to get out of debt if you pay off your credit card debt first.
I ran a simulation and put the results in an easy-to-read table on http://fasterfinancialfreedom.com. Then I put everything into English so it would make even more sense.