So how do they work?
Ice
The most important thing coolers have going for them is the ice inside. In order to melt, a block of ice needs to absorb a considerable amount of energy. The ice and ice water will stay at freezing temperature until the ice has nearly completely melted, so even without the insulation of the styrofoam, a cooler could probably keep your food cool for several hours.
Convection and Conduction
An ice cooler mainly has to prevent two kinds of warming: convection and conduction. Convection occurs when currents of a fluid such as air move heat from a hotter object to a cooler one. Conduction occurs when heat moves directly from a warmer object to an adjacent colder one. Coolers are designed to minimize both kinds of heating.
Preventing Convection
When a cooler is opened, convection currents immediately take their toll. Warm air blows in, melting the ice inside and warming up the cooler. As long as coolers are kept closed most of the time, convection does little to warm them up. Air currents can warm the surface of the cooler, but this warmth takes a long time to get inside because of the insulating properties of the cooler.
Copied from eHow.com