What causes a heat generating source to stabilize at a certain temperature? (Answered by myself, I think) For example, we out a heat sink on a microprocessor to keep it cooler.
I understand that if we run 100 watts of electricity through the microprocessor, it will generate 100 watts of heat, or 100 Joules per second.
If the temperature of the CPU stabilizes at 50 degrees Celsius, how do we calculate the heat flow of the heat sink when the ambient air temperature (contacting the heat sink) is 30 degrees Celsius?
I initially thought that the heat flow would simply be 100 Joules per second when the CPU reached 50 degrees, thus causing no more energy to remain to heat the CPU anymore, but then I get confused. Does the heat sink have different heat flow for different amounts of energy at the base?

I believe I just answered my own question. The heat sink has a heat flow that is proportionally related to the temperature difference of the CPU temp and the ambient air temp. 
One more thing. Can somebody point me to a good resource on heat flow and thermodynamics relating to this type of subject? Thank you.
 A: "I understand that if we run 100 watts of electricity through the microprocessor, it will generate 100 watts of heat. Or 100 Joules per second."
True.
"If the temperature of the cpu stabilizes at 50 degrees celcius, when the ambient air temperature (contacting the heatsink) is 30 degrees celcius, how do we calculate the heat flow of the heatsink?"
It is not really simple - practically, there is a temperature space, which is a 3d function (i.e. scalar field) and says the temperature on a given point of your system (this time: cpu + heat sink + air system). The heat flow everywhere will be the gradient of this scalar field, multiplied by the thermal conducting capability of the actual material. It is not simple, there are complex simulations for such problems, but the final solution will be what we also intuitive feel: the heatsink, by its good thermal conducting capability, leads a big part of the generated heat of the cpu to a its much bigger surface. And thus makes the heat transfer between the surrounging air and the cpu much bigger.
No. The heat transfer between the (cpu + heatsink system) and the surrounding air will be exactly 100W. Always. If it weren't so, the temperature of the cpu weren't stable.
What isn't always 100W, that is the heat transfer between the cpu and the heatsink. It is because a part of the generated heat goes away without the heaksink as well.
