The first real rule is that you don't want shake up the wine (well, most wines) very much. Get something that lets you get the cork out easily and smoothly. Its a nice idea to find something that doesn't break the cork off in mid-pull (there are little hooks that will help you fish out a cork you've been forced to push down into the bottle).
On the other hand, I knew one "wine expert" who swore that he could "age" fine young red wines as if they were laid down for a decade, merely by vigorously shaking the wine up and down and pouring them back and forth between containers. I've done it. It "seems" to work. Assuming you find the practice acceptable (there are those who will tell you this "bruises" the wine) and you think you can do it somewhat unobtrusively, it is one way to deal with high wine list prices. Buy something young and shake it up!
With fancy old red wines, it can get a bit more complicated. As wines mature, sediment(which is tannic), described by some as "crud in the bottle" will come out of the wine. If the wine is laying on its side, the sediment will be along the lower edge of the bottle. The best thing to do is stand the bottle upright a day or two before you plan to drink it. Then the sediment can fall to the bottom of the bottle. Handle the bottle very carefully. You don't want to mix the sediment back through all the bottle. When you pour, stop before any sediment comes out.
If you haven't managed to get the bottle upright in advance, you can serve the wine from a cradlewhich inclines the wine at about a 45 degree angle. If you carefully open and carefully pour, the sediment will stay along the bottom edge and out of your glass.
Just because there was no discoloration or growth along the top of the cork does not mean that is isn't possible that the cork hasn't caused a problem with the wine, or that there isn't some other problem. It is useful to smell the wet end of the cork before drinking the wine. Sometimes it will give you advance notice that there is something wildly off about the wine, including that the wine may be "corked." See the section on What to Do In a Restaurant for more about this practice.
This is where you pour the wine out of the bottle into another container (a "decanter"). Properly decanting a bottle lets you get rid of sediment. Use a candle behind the neck of the bottle to see when sediment gets to the neck (I'm repeating the standard line here---Assuming you don't get it close enough to heat up the wine, is there some reason you can't use a light bulb?). Stop pouring as soon as you see the sediment. Not all wines have sediment, but old vintage Port does and is always decanted for this reason. Some people will decant through cheesecloth, wire mesh placed in a funnel or even coffee filters.
Some wines will say on their label that they are "unfiltered." (See the section on fining and filtering.) If you find that there is sediment in such wine, go ahead and decant, but just because a wine is unfiltered doesn't necessarily mean that there will be sediment.
There are other reasons to decant wine. For example, some young white wines may be have a sulfurous quality which can be removed by spirited decanting. Decanting also lets red wine "breathe," giving any bad but very volatile chemical compounds in the wine a chance to evaporate ("blow off") so they're not there when you serve it.
Some wines (for examples some Burgundies and Bordeaux) when young are "accessible," meaning that you can detect the bouquet and flavors that are and will be in the wine. But then chemical reactions take place and the wine closes up (becomes "closed"). What was there before is harder to perceive. The wine gets, as they say, "dumb." Aging the wine causes the wine to again open up (tannin, a bitter flavor, turns to sediment and won't be tasted--if it isn't poured into the glass!), and is more "complex." Since letting oxygen in the air get to wine can help to open it up, decanting will help this process along, though not as much as aging it would.
Be forewarned, however. Not all wines benefit from this airing (known as "letting the wine breathe"), for example, fine Burgundies. Also, you can allow a wine to breathe too much. While oxygen helps to open up the wine, it alsooxidizes the wine, which will eventually ruin it. Finally, a wine that is "over the hill" isn't going to get anything from breathing, since it is already "gone." Experience is important here. In any event, if you don't know, don't decant. While there are those who advocate letting wine breathe, most don't, or when they do, advise a relatively short period of time (an hour for young reds, 2 to 3 hours for older fine reds; and some say don't decant until just before drinking).
Some people will let a wine breathe by opening up the bottle, but not decanting it. This really isn't of much use since not much oxygen is going to get down that small neck.
The trick of shaking the wine so that it forms like soda pop is certainly an extreme example of getting oxygen into wine; but if it works....