Thermal overload trip in chips
Internal Diodes can measure voltage by negative temp coefficient (NTC) and thus convert to a temperature. Many chips have overtemp protection (OTP), such as Smart switches and regulators.

Power dissipation is computed by Ohm's Law for static loads and switched charges with driver ESR losses for CMOS that vary with V and f and given in datsheets near the end of xxx pages. 

Thermal design is spec'd with thermal resistance Rjc, junction to case and junction to ambient Rja by ['C/W] then heatink or force air cooling is like Ohm's law for thermal resistance. Heatsinks and interface thermal grease are then added in series, Rja (jcn to ambient) with convection air.  Forced air can improve resistance from 10% to a few % proprotional to surface velocity.

An Intel CPU has a very low Rjc and then a forced air heatsink needs Rca of &lt;0.1 to 0.2'C/W to keep cool, depending on budget $ and power [W] so that the sum of all thermal R's *Pd = temp rise above ambient.