You can profit from a stock losing value by selling that stock short. In a nutshell, short selling involves borrowing shares from a broker and selling them on the open market.

When you buy a stock, closing out your position is a simple matter of selling that stock. Closing a short position is a bit more complicated. In order to close a short position, the borrowed shares must be returned to the broker.
This requires the investor who shorted the stock to buy shares, hopefully for the investor at a lower price than the price at which the shares were borrowed. This act of buying shares on the open market to close out a short position is called short covering, or buying to cover.
Short Sale
What is buying to cover?
Investors buy shares to cover short positions. They initiate buy-to-cover orders with their brokers. A buy-to-cover order instructs a broker to acquire exactly enough shares of the borrowed stock to close out the investor's short position.
Buying to cover is different than simply buying a stock. When an investor wants to buy and hold a stock, they place a standard buy order. In contrast, a buy-to-cover order is designed to close out a short position. An investor buying to cover does not own the stock once the transaction is complete since the investor had borrowed shares that needed to be returned.
An investor who shorts a stock may enter a buy-to-cover limit order, which is structured to take advantage of any dips in the stock price by specifying a target maximum price at which the buy-to-cover order can be executed. If an investor shorts a stock when it trades for $50, then a buy-to-cover limit order with a $40 limit ensures that the investor receives a profit of $10 per share if the stock price ever dips below $40.
In contrast to an investor buying a stock, and can then profit by selling the stock at a higher price, an investor shorting a stock profits if the stock decreases in price. Investors who are buying to cover are locking profits or losses from the short sale of a stock.
Is buying to cover risky?
Buying to cover is the act of buying enough shares to cover a short position, so while executing that specific transaction is not by itself risky, shorting a stock can be.
When you as an investor buy a stock outright, the most you can lose is what you paid for that stock because the lowest possible price for that stock is $0. But if you sell a stock short, then your potential losses are technically unlimited because the maximum price of a stock is not capped.
By the same measure, shorting a stock has limited upside potential since the lowest stock price is zero. The most profit you can earn from a $50 stock is $50, while a $50 stock you own directly can appreciate in value by much more than $50. A stock's upside is unlimited, but only if you own it directly.