One of the building blocks of derivatives theory is delta hedging. This is the theoretically perfect elimination of all risk by using a very clever hedge between the option and its underlying. Delta hedging exploits the perfect correlation between the changes in the option value and the changes in the stock price. This is an example of 'dynamic' hedging; the hedge must be continually monitored and frequently adjusted by the sale or purchase of the underlying asset. Because of the frequent rehedging, any dynamic hedging strategy is going to result in losses due to transaction costs. In some markets this can be very important.
The 'underlying' in a delta-hedged portfolio could be a traded asset, a stock for example, or it could be another random quantity that determines a price such as a risk of default. If you have two instruments depending on the same risk of default, you can calculate the sensitivities, the deltas, of their prices to this quantity and then buy the two instruments in amounts inversely proportional to these deltas (one long, one short). This is also delta hedging.
If two underlyings are very highly correlated you can use one as a proxy for the other for hedging purposes. You would then only be exposed to basis risk. Be careful with this because there may be times when the close relationship breaks down.
If you have many financial instruments that are uncorrelated with each other then you can construct a portfolio with much less risk than any one of the instruments individually. With such a large portfolio you can theoretically reduce risk to negligible levels. Although this isn't strictly hedging it achieves the same goal.
To reduce the size of each rehedge and/or to increase the time between rehedges, and thus reduce costs, the technique of gamma hedging is often employed. A portfolio that is delta hedged is insensitive to movements in the underlying as long as those movements are quite small. There is a small error in this due to the convexity of the portfolio with respect to the underlying. Gamma hedging is a more accurate form of hedging that theoretically eliminates these second-order effects. Typically, one hedges one, exotic, say, contract with a vanilla contract and the underlying. The quantities of the vanilla and the underlying are chosen so as to make both the portfolio delta and the portfolio gamma instantaneously zero.
The prices and hedging strategies are only as good as the model for the underlying. The key parameter that determines the value of a contract is the volatility of the underlying asset. Unfortunately, this is a very difficult parameter to measure. Nor is it usually a constant as assumed in the simple theories. Obviously, the value of a contract depends on this parameter, and so to ensure that a portfolio value is insensitive to this parameter we can vega hedge. This means that we hedge one option with both the underlying and another option in such a way that both the delta and the vega, the sensitivity of the portfolio value to volatility, are zero. This is often quite satisfactory in practice but is usually theoretically inconsistent; we should not use a constant volatility (basic Black-Scholes) model to calculate sensitivities to parameters that are assumed not to vary. The distinction between variables (underlying asset price and time) and parameters (volatility, dividend yield, interest rate) is extremely important here. It is justifiable to rely on sensitivities of prices to variables, but usually not sensitivity to parameters. To get around this problem it is possible to independently model volatility, etc., as variables themselves. In such a way it is possible to build up a consistent theory.