Who Pays The Loan After A Borrower's Death?

It must be noted that the shifting of the liability depends upon the type of loan taken and the collaterals.