Its like Ohms law. The hottest bit is the transistor junction, so Tj is like voltage. This Tj is trying to push power (like current) out to the ambient temperature, Tamb. So between the Tj and Tamb, there is the transistor case thermal resistance (Rt) - quoted as degrres/watt, heat sink resistance Rh (Degs/watt).
So you have a transistor dissipating , say 20 W with a Rj of 120 max, so add in the thermal resistance of the junction to case of .5 deg/w, so now the max case temp can be 120 - 20 X.5 = 110 degrees. Now if this is mounted on a heat sink of 1.2 degrees/w, there will be a another temp drop across this of 1.2 X 20 = 24 degrees. So the heat sink can be in an ambient temperature of 110 - 24 = 86 degrees. As the normal Tamb is taken as 40 degrees max, this heat sink is satisfactory, if the answer cam out to 20 degrees, the heat sink has a too high a thermal resistance .
Frank