All electronic components generate heat which must be dissipated in order do not to destroy it.
In some cases the surface of the device itself is sufficient, in some other cases an additional heatsink is required.
A few technical data are taken from the datasheet and the ambient temperature are only requires, in order to calculate the thermal resistance of the required heatsink.
Thereafter, you can select a suitable heatsink from the assortment of electronic traders.
The following calculation determines the maximum usable thermal resistance of the heatsink (lower is better) and also outputs the maximum temperature of the heatsink surface.
The calculation is based on the following facts: The power dissipation PV is to emit to an ambient with the temperature TA, without to overheat the interior of the component over the (junction) temperature TJ). The power dissipation has to overcome on its way to the ambient more (thermal) resistances. Firstly, there is the thermal resistance of the component itself, the usually is specified with RJC (RthjC). It includes the path of the internal heatsource (junction) to the component housing (connection tab). In addition, the thermal resistance RCK comes at the way from component housing to the heatsink. This value can be estimated only, because it is dependent of the mechanical construction and possibly interleaved materials (thermal paste, mica washers). The last on the way to the ambient (temperature) is the thermal resistance of the heatsink RKA is on the way.