In red wines, after a few years a sediment begins to form and proper aeration separates the wine from any residue that has built up. Ports are in a class by themselves and can benefit by several hours of decanting. Decanting is particularly good for young and tannic red wines. Cabernet Sauvignon, most Zinfandels, Bordeaux, Rhone Valley wines and many Italian wines fall into this category. Tannin is a substance found in wine skins and as red wines are fermented in their skins, a slight bitterness can cling to the palate upon tasting.
Aeration softens the tannins and improves the overall taste considerably.
The rule of thumb is usually an hour. For older wines with sediment, stand your bottle upright for a day or two before drinking so the sediment can return to the bottom. As you pour or decant the wine, stop pouring when any cloudiness appears on its way to the neck.