A way to use debt to enhance your return on investment.
Margin trading is when you buy and sell stocks or other types of investments with borrowed money. This is how one is taking on debt to invest. The design is to leverage one's position by borrowing the assets from a brokerage firm, thus enhancing the return if things go as planned.
The risk, of course, is if the market goes counter to the position. Margin trading magnifies both gains and losses.