It's an older video of Dave's, but the principles have not changed...
You basically take the ambient air temperature, work out ALL the thermal resistance components from the air to the working zone of the component (the silicon die for ICs, transistors and the like) and add them up. With this figure and the power your component is dissipating, you can work out the temperature that the die will get to when it is working at that power level. You then look this temperature up in the component's datasheet and see if it will survive.
Understand that you must keep it under the maximum temperature, but getting that temperature down further will increase the reliability - and the life - of that component.