What is a margin call?
When you have a margin loan outstanding, your broker may issue something known as a margin call, particularly if the market moves against you. When you get a margin call, your broker can demand you pony up more cash or sell out positions you currently own in order to satisfy the call. If you can't cover the call, your broker will liquidate your positions to get it covered.
If your broker starts selling out your positions, that broker doesn't care about your tax situation, your view of the company's long-term prospects, or anything else other than satisfying the call. If the market really moves against you -- say the company whose stock you bought on margin declared bankruptcy and the stock became worth $0 -- you're still on the hook for your borrowed funds.
Why buying on margin is a bad idea
Short-term movements in the market are almost impossible to predict, and there's always the risk of a black swan event like the coronavirus pandemic crashing the market. While the upside of margin trading may seem appealing, the downside risk is much greater.
As an investor, you have no control over the timing of a margin call, and you can fall victim to one even if it's just from a short-term movement. Even if you still believe that a stock will recover, and it does, you could still be forced to liquidate, meaning you missed out on gains you would have gotten if you were using an ordinary cash account.
Additionally, the interest payments and maintenance requirements add other costs and risks. Especially for beginning investors, it's best to avoid trading on margin since it's not always clear how much you've borrowed from your brokerage and how much you have in equity, plus it's easy to think of all of your holdings as your money even if much of it is borrowed. Remember that it's beneficial to your broker for you to use a margin account since it's an easy way for them to make money, so it's in their interest to encourage you to do so.
The recent events with WallStreetBet stocks like GameStop (GME +2.05%) offer the best argument for not using margins. It's easy to get sucked into such trades when the stock is skyrocketing, but GameStop just as quickly reversed, leaving thousands of traders facing a dreaded margin call.