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.