When you open a margin account, you sign a hypothecation agreement which pledges the securities bought on margin to the broker. loan. The broker rehypothecates these securities to a bank to secure a loan. IOW, your broker, who is the lender to you, then uses your assets for a loan to cover its own obligations.
Reg U limits the amount of customer securities that can be pledged to 140% of the customer's debit balance. The remaining non pledged securities are called "excess margin securities" and must be segregated.
Here is A Hypothetical Example of Rehypothecation:
Imagine you have $100,000 worth of Coca-Cola shares parked in a brokerage account. You have opted for a margin account, meaning you can borrow against your stock if you desire, either to make a withdrawal without having to sell shares or to purchase additional investments. You decide you want to buy $100,000 worth of Procter and Gamble on top of your Coke shares and figure you'll be able to come up with the money over the next three or four months, paying off the margin debt that is created.
You put in the trade order and your account now consists of $200,000 in assets ($100,000 in Coke and $100,000 in P&G), with a $100,000 margin debt owed to the broker. You will pay interest on the margin loan in accordance with the account agreement governing your account and the thin-margin rates in effect for the size of the debt.
Your brokerage firm had to come up with the $100,000 in case you wanted to borrow in order to settle the trade when you bought P&G. In exchange, you've pledged 100% of the assets in your brokerage account, as well as your entire net worth, to back the loan as you've given a personal guarantee. That is, you and your broker have entered into an arrangement and your shares have been hypothecated. They are the collateral for the debt and you've given an effective lien on the shares.
How Brokers Get Margin Lending Funds
...Regardless of how the broker funds the loan, there is a good chance that, at some point, it will need working capital in excess of what its book value alone can provide.
For example, many brokerage houses work out a deal with a clearing agent, such as the Bank of New York Mellon, to have the bank lend them money to clear transactions, with the broker settling up with the bank later, making the whole system more efficient.
To protect its depositors and shareholders, the bank needs collateral. So the broker takes the Procter and Gamble and Coca-Cola shares you pledged to it and re-pledges it, or rehypothecates them to Bank of New York Mellon as collateral for the loan.