Hedging is a tool to minimize the risks. It is thus like an 'insurance' where one pays a premium but gets an assured amount in case of some uncertain event to the extent of the loss actually suffered on an equally opposite position for which the hedge was done. Thus, hedger is different from arbitrageur and speculators, as the intention here is not to maximize the profit but to minimize the loss.

E.g. In Capital Markets, suppose an investor has an equity portfolio of Rs. 2 lacs and the portfolio consists of all the major stocks of NIFTY. He thinks the market will improve in the long run but might go on a downside in the shortrun. NIFTY today stands at 4300. To minimize the risk of downfall, he enters into an option contract by buying NIFTY-PUT of strike 4300 at a premium of, say, Rs. 100. Thus, the actual amount paid is Rs. 5,000(lot size of NIFTY is 50). Also, the number of NIFTY-PUTs to be bought will vary on the beta of the portfolio so as to completely hedge the positon.
Now, if the market goes up, the investor has no problem as his portfolio is in profit but if the market goes otherwise, his portfolio suffers but the same the put option earns and thus effectively he neither losses not gains.

E.g. In Forex Market, suppose, a textile-goods exporter is to receive $1,000 on a certain future date for a consignment he sends today. He is exposed to a foreign exchange risk. If the rupee appreciates, the exporter will suffer a loss as he will now be able to convert $ into less amount of Rs. To minimize this risk, he enters into a future contract of equal amount to convert these $ into Rs. at a fixed exchange rate. Now, one might think of an uncertain event of rupee being depreciating. But in business sense, his business is not to earn profits from the change in forex-rates but to earn from trading in textile-goods. He thus hedged his position by completely removing the foreign exchange risk.