Tc is the case temperature.
Ta is the ambient temperature
The dissipation given for Ta can be used if you do not intend using a heatsink. Derate that power to allow for a reasonable ambient temperature (it may be hotter that 25C).
A simple way is to use the specs of your heatsink to calculate how much the power given at a particular Tc should be derated. E.g. if the device allows 40W at Tc 25C, derated by 0.4 watts per deg C, and you have a 4 degC/Watt heatsink, and want to dissipate 9 watts, then the case temperature will be (9 * 4) 36 degrees higher, and the max dissipation will be (40 - 36*0.4) 25.6W which is more than we want to dissipate, so it will be OK. Note that does not imply you can dissipate 25.6W -- you can't.
To calculate things properly, you need to assume an ambient temperature (you might pick 40C) and a power (e.g. 2.5W), then use the various thermal ratings (e.g. Thermal resistance junction to air, say 70degC/Watt) to determine the junction temperature. In this case, the junction temperature would be (2.5*70 + 40) 215C -- way over the absolute max which will be between 125C and 175C
A result like that means that a heatsink is required. So if the Thermal resistance junction to case is 10degC/Watt and you have a 12 degC/Watt heatsink then the junction temperature would be (2.5*(10+12) + 40) 95C -- much better.
However all is not complete there. You may need to insulate the device from the heatsink, the heatsink may b less efficient that the manufacturer states, and airflow may be restricted. All of these will mean the actual junction temperature will be higher.
You can't measure the junction temperature directly, however, if you assume the junction is initially at ambient temperature, and knowing the thermal resistance from junction to case, you can estimate the junction temperature knowing the ambient and case temperature and the power being dissipated.
Is this complex? Yes. But after doing it once or twice it becomes much easier.
If you have a look at a
fairly typical datasheet you will notice that for some devices the thermal resistance to air is not given. In this case it is simply assumed that you will be connecting it to a heatsink.
In
another case the device may be typically used with or without a heatsink, so the junction to case and junction to ambient are given.