Wine goes bad after opening from prolonged exposure to oxygen and the action of lactic acid-producing bacteria. Oxygen exposure oxidizes chemical components of the wine, while the bacteria ferment the wine in the same process used to produce wine vinegar.
Refrigeration slows down the oxidation process and inhibits bacterial growth, keeping wine fresh for a longer period of time than it would remaining at room temperature. Low temperatures do not completely stop the spoilage process, and refrigerated wine eventually goes bad due to oxidation.
Unopened wine does not go bad. Both spoilage processes require the wine to be exposed to oxygen, and thus wine that remains completely sealed cannot oxidize or sustain bacterial growth.