The rover´s temperature controls
Like the human body, the Mars Exploration Rover cannot function well under excessively hot or cold temperatures. In order to survive during all of the various mission phases, the rover´s "vital organs" must not exceed extreme temperatures of -40º Celsius to +40º Celsius (-40º Fahrenheit to 104º Fahrenheit).
The rover´s essentials, such as the batteries, electronics, and computer, which are basically the rover´s heart and brains, stay safe inside a Warm Electronics Box (WEB), commonly called the "rover body." Heaters are packed inside the rover body, and like a warm coat, the WEB walls help keep heat in when the night temperatures on Mars can drop to -96º Celsius (-140º Fahrenheit). Just as an athlete sweats to release heat after an intense workout, the rover's body can also release excess heat through its radiators, similar to ones used in car engines.
There are several methods engineers used to keep the rover at the right temperature:
Why the rover needs temperature control systems on Mars
Many of these methods are very important to making sure the rover doesn´t "freeze to death" in the cold of deep space or on Mars. Many people often assume that Mars is hot, but it is farther away from the sun and has a much thinner atmosphere than Earth, so any heat it does get during the day dissipates at night. In fact, the ground temperatures at the rover landing sites will swing up during the day and down again during the night, varying by up to 113 degrees Celsius (or 235 degrees Fahrenheit) per Mars day. That´s quite a temperature swing, when you consider that Earth temperatures typically vary by tens of degrees on average between night and day.
At the landing sites, an expected daytime high on the ground might be around 22º Celsius (71º Fahrenheit). An expected nighttime lows might be -99º Celsius (-146º Fahrenheit). Atmospheric temperatures, by contrast, can vary up to 83º Celsius (181º Fahrenheit). An atmospheric daytime high might be -3º Celsius (26º Fahrenheit), while a nighttime low might be -96º Celsius (-140º Fahrenheit).