Hedging means opening a position specifically to offset the risk of an existing one — for example, holding both a long and a short position on the same or a correlated pair, so that losses on one are cushioned by gains on the other. In forex this can mean directly hedging the same pair (where the platform's account mode allows it) or cross-hedging with a correlated instrument.
Hedging reduces (but rarely eliminates) directional risk; it typically also means paying two sets of spreads or swaps, so it's a deliberate trade-off between risk reduction and cost, not a free way to avoid losses.
Next step
Guide
What Hedging a Position Actually Costs
Opening the opposite trade freezes the price, not the bill. The spread paid twice, two separate swaps, a margin discount that can be withdrawn, and the decision a hedge only postpones.