A bearish divergence occurs when price is trending up or making new high's then at the same time indicators are either trending down or failing to establish new high's with price. This is opposite for bullish divergence, when price is moving down and the indicator is not and when price is making new lows the indicator is not. The most common indicator to use for divergence is MACD.
The bottom in March was signaled by the bullish divergence on MACD. Hindsight is 20/20 but learning from this is important. The chart below shows when the market was making a new low in March, MACD was not. This was a clear bullish divergence that should have been taken advantage of.
Now the market has been rallying since those March lows, and during the beginning stages the SPX and MACD moved in tandem. Then in June, SPX made a new high, while MACD did not, this signaled the drop in late June. SPX rallied to make another new high and MACD agreed with this price action making a high with SPX, but SPX's recent highs have not been followed by a MACD high. Giving a signal of bearish divergence. While this does not mean the market will tank, it is again showing signs of a possible topping process and that the rally is losing momentum.
Here are a few historical examples of divergence:
1937:
1987:
The divergence in SPX can be signaling a possible top, or correction. But price can keep climbing while MACD is declining so wait for a clear signal to sell. If you look at the historical examples, once the top level of support broke the selling started. This is because the people who brought at the top will be the first to get out and get out quick. So a break of 1050 would be a strong signal that the divergence is correct.
Both the bullish divergence from March and bearish divergence now can been seen in other sectors:
XLF:
IYR:
XHB:
Here is USD which has been showing bullish divergence:
While now indicator is perfect combining them with price can be helpful in spotting if a trend has momentum behind it or if the momentum is running out.