For anyone not interested in the heat transfer/thermodynamics of heat sinks you can just skip this post. I purposely made this somewhat in depth so it may be referred to in the case of other questions about heat sink operation… and because I’m sick of being in the machine shop and need a break.
I’m going to just address this on a macroscopic level (meaning, in this case, not at the atomic size). Heat transfer can be thought of as an analogous electrical circuit where the heat transfer, q_dot, is the current; the temperature, T, is the voltage; and the thermal resistance R, is the electrical resistance. The definition of thermal resistance – R = DELTAT/q_dot where DELTAT is the difference in temperature between the two points (such as the CPU and air temperatures). Thermal resistances can be added, in series and parallel, in the same manner as for electrical circuits.
You have a heat load, which in this case is the CPU, and you have the ambient air. The heat now needs a path to travel to the air. There are three modes of heat transfer – conduction, convection, and radiation. I’m going to just dismiss radiation since it is proportional to the difference of the temperatures to the fourth power, and hence not a substantial amount of heat transfer.
Conduction
Conduction, put simply, is just the heat flow through a solid material. The governing equation for 1-D conduction is q_dot = k*A*DELTAT/L where k is the thermal conductivity (an empirically measured quantity, specific to material), A is the cross sectional area of the heat path, and L is the length the heat must travel through. Going back to the definition of thermal resistance, the resistance due to conduction would be R_cond = L/(k*A).
Convection
Convection is, in reality, the combination of fluid flow and conduction between gas molecules. The governing equation for convection is q_dot = h*A*DELTAT where h is the heat transfer coefficient and A is the exposed surface area. The resistance due to convection would then be R_conv = 1/(h*A).
So now we have the two main modes of heat transfer, how does this apply to a heat sink? Well, say you take a solid copper cube and put it on the CPU. You will have conduction, and thus conduction resistance, through the copper, and convection from the sides of the cube. However, the area for convection is relatively small making R_conv substantially larger than R_cond. In order to lessen the convection resistance two things can be done – increasing the surface area, and increasing the heat transfer coefficient, h. Increasing surface area is fairly self explanatory; you can make a star pattern, make grooves etc. There is a limit to how long and how close together the fins can be due to thermal boundary layer interaction, but that is beyond the scope of this post. To increase h the main solution is to induce forced convection (as opposed to natural convection) by use of a fan. There are correlations between h and various other parameters (Reynolds number, Nusselt number, geometry, etc) but essentially all you need to know is that generally the higher velocity (or flow rate assuming a constant density) the higher the heat transfer coefficient and lower convection resistance. The conduction resistance can be minimized by choosing a material with a high k value such as copper or aluminum, increasing the cross sectional area, or decreasing the heat path length.
Putting this together, you will have an overall thermal resistance which is the sum of R_cond and R_conv. The heat flow equation then becomes q_CPU = (T_CPU – T_air)/(R_cond + R_conv). It can then be seen that the CPU temperature is governed only by the heat output of the CPU and the resistance, or performance, of the heat sink. Note that this only addresses heat transfer in one dimension. Multi-dimensional heat transfer get a bit more complex, but the same ideas apply.