Shorting a stock means borrowing it and paying a fee for borrowing it. Then selling the borrowed stock and hoping when you buy it back it's worth less. If the borrower doesn't want his stock back and the price is too high for you, then you simply don't buy and continue to pay the fee.
So if you borrow stock for $100, maybe each year you pay a $5 fee, and sell it for $100. Considering there wouldn't be any transaction fees you would now have $95. If the price now rises to $500, you don't buy but continue to pay the $5. So it means you are only $90 ahead instead of $95. But you are not in the minus.
This is actually a really good deal for both the borrower and the short seller, which is why I bet there are lots of rules forbidding that and banks not actually doing it if you don't borrow a certain minimum size of a few million $. I don't know that, though. In theory you and I could do that game as well, if it's not illegal.
But most people don't 'leverage' like that. So they either get spooked and cut their losses (before the price goes on to $1000) or their broker steps in and basically says: "either you show us that $400 or we sell before your bad judgement becomes ours."
The risk in doing this is unlimited. If you short a stock at $100, and then it goes to $500, you've lost $400.
Your broker doesn't want to take liability for your loss if you're not able to cover it. So your broker will forcibly close your position for you.
Even if your broker doesn't close your position, you might do it yourself to stop losing money.
When a lot of people do this all at once, it's called a "short squeeze" as everyone who was short buys shares to close their short positions. It can make the price go up.
I don't follow Tesla's stock price, but Musk getting on Twitter saying something that could make the stock price go up could (and perhaps did) cause a short squeeze.