Most wine bottles are sealed with cork plugs. Cork tends to dry up and then shrink, which allows air to enter the bottle. The air causes the wine to oxidate and lose its good taste. In order to prevent this, the bottle is kept horizontally. That insures that the fluid inside the bottle (the wine) is in constant contact with the cork plug, thus preventing it from drying up and shrinking.
Due to the high costs of cork, some wine makers are using synthetic replacements. Those replacements do not shrink when dried up, so bottles sealed with them are not needed to be kept horizontally.