It's very simple: if the terms are satisfactory and against an agreed upon collateral (e.g. shares) banks will give you a loan that does not require periodic payments. The interest on the loan does accumulate of course, and is just added to the principal that the borrower owes. The bank is happy as long as the value of the collateral is higher than the current outstanding loan. If the loan is in danger of going "under water" the bank can either liquidate the collateral to pay itself, or the borrower can renegotiate the loan and deposit additional shares.
It's similar to a reverse mortgage. Say Fred and Wilma own a house worth $4MM with no mortgage on it. With a reverse mortgage a bank will lend them $2MM. Fred and Wilma make no payments and continue to live in their house, spending the $2MM while the interest on that loan just increases the amount they owe the bank. After both Fred and Wilma have passed away the house is sold and the proceeds are used to pay back the outstanding loan. If there's still money left over, it goes to their heirs. If the sale comes up short, the bank loses money, which is why these reverse mortgages are typically less than 50% of the value of the house and they typically have higher interest rates than conventional mortgages. From Fred and Wilma's point of view, they can use the value of their house now, while continuing to live in it. They essentially spend their children's inheritance.