Computer maintenance describes various steps to keep your computer functioning at an optimal performance level from a software and hardware point of view.
A must know factor is that your system, desktop or laptop, was designed to function at room's temperature. High temperatures can make your computer run slower and sluggish and sometimes even turn off without any warning. Today's computers are designed to turn off when their components are getting to hot, like a safety measure. Low temperatures can also damage your computer, because your hardware components produce heat and in combination with low temperature the condensation effect appears. Condensation will build on computer's components and cause them to degrade or even short out.
Desktops are designed usually with cooling systems (cooling fans) for power supply and cpu (we are speaking here about cooling through ventilation).
It's recommended for your desktop to have a big case(tower) in order for the components to have as much space as possible for a proper cooling. Additionally you can look to change your standard CPU fan with a more advanced one. This will create a better airflow and it will efficiently cool the CPU heat.