Margin debt usually refers to the notion of borrowing from yourself. More or less. Here's how it works in practice: You want to buy a car, a new one. You can do one of three things really.
One: Sell stocks that you've owned "forever" since your Bar Mitzvah and pay a lot of tax on them because they have huge gains. It's nice that they have big gains but net of the taxes, they look cheap to you and you wouldn't want to sell them if you didn't have to because you think they can double in the next couple of years.
Two: Borrow money from the auto dealer to buy the car. You know what kindly loving people auto dealers are, right? They'd give you the loan cheap and the car cheap because you are their friend...right. You want to be able to negotiation hard and with your own cash rather than have to turn your pockets inside out and beg. So rather than have your pockets picked by the friendly auto dealer, you try Door Number Three:
Three: Borrow from yourself. Yeah, you can do that. Set up your shares at a Schwab or E*TRADE or Scottrade or any other brokerage. You pledge your $50,000 or so of stocks (most brokerages will let you margin up to 50% of the total). So you could borrow in theory up to $25,000 from yourself.
Now the brokerage will charge you margin interest but that price is almost certainly less than the auto dealer would charge you and by coming in with cash to buy the car you almost certainly get a better deal. The big risk in margin debt like this is borrowing "too much" - that is, if you borrow $25,000 and your stock portfolio goes down 2% the next day, you will suffer what's called a "margin call" and will be forced to either find cash from mom or some other source to make up the difference or sell stocks, pay taxes on them and then meet your margin minimums.
Specifically, a 2% loss on a $50,000 portfolio is a loss of $1,000.