Where does the metaphor come from?
It goes back to Ward Cunningham's experience report on the WyCash system, presented at OOPSLA in 1992. Cunningham wrote that shipping first-time code is like going into debt [2]. A little debt speeds development, he argued, so long as it is paid back promptly with a rewrite [2]. Martin Fowler credits the term to Cunningham as well [1].
What do interest and principal stand for?
Fowler calls the deficiencies in internal quality "cruft"; they make the system harder to change [1]. The extra effort needed to add new features because of that cruft is the interest on the debt. Cleaning it up is like paying off the principal, and the work pays for itself as more similar features arrive [1].
Fowler gives a concrete case. Imagine a confusing module structure in the codebase. A feature that would take four days in clean code takes six because of it, and those two extra days are the interest [1].
What happens if the debt is never repaid?
Cunningham notes that every minute spent on not-quite-right code counts as interest on that debt [2]. Left unpaid, the weight of an unconsolidated implementation can bring an entire engineering organisation to a standstill [2]. The warning, then, is not against borrowing but against letting the debt grow unnoticed.