Let's assume that you know Apple very well, and you think it will definitely go up next month, so you bought Apple shares.
But Apple is listed on NSDQ, and you don't know NSDQ. You need to hedge the risk brought by stock index fluctuation, so you short stock index futures. How much to buy is calculated according to the beta value of the market. Because Apple's revenue consists of its own revenue A and market revenue B, the risk brought by revenue A is also called RA, and revenue B is called RB.
Because you know apple very well, you are sure that RA is small, but you don't know RB, so you have to rush RB. As a result, apples went up and A went up. If NSDQ goes up, B will lose money, but if Apple goes down, A will lose money and B will make money. This is hedging.
Simply put, it is to short while doing more. In any case, you can control the risk within your tolerance.
Similarly, you can think of many risks. For example, if you buy US stocks in China, you have to exchange RMB, but you don't know the exchange rate, so you have to hedge the exchange rate risk. You can use forward contracts or futures.
There are many ways to hedge, always just buying and selling, keeping the risks you want and hedging the risks you don't want to take.