How does the money supply behave when bank loans are repaid?
The money is removed when the loan principal is repaid. The actual point in the loan this occurs depends on the loan terms. For a typical compound interest rate loan, this means a small portion of the principal is repaid every month, and a matching liability deposit (money in the customers account) is removed.

For an interest only loan, this occurs at the end of the loan - assuming all the principal is repaid then.

Interest payments essentially circulate through the monetary system. They're deducted from the customer's account, recognised as income by the bank, and then paid out as some form of expense, e.g. salaries, rent, taxes, etc. They may also be moved into an internal account to provide required loss provisions on loans. 

Loan defaults are also an expense, and this is the achilles heel of the banking system. If defaults on loans exceed the bank's loss provisions and profits from interest, then the bank will have to write off against its capital - and this interferes with the regulatory controls on lending, causing the money supply to shrink. In practice, central bank or government intervention is inevitable if this occurs.

As far as the relationship of principal to the money supply. Essentially the banking system relies on new lending always being sufficient to replace the money being removed. In most banking systems, new lending is typically in excess of loan repayment, and so we see the money supply more or less continuously expanding.