When constructing your Simscape Electrical circuit, you will need to enable thermal ports of the relevant components which generate heat. These are: resistors and semiconductor switches typically. When using a Resistor block for example, right click the block, go to 'Simscape' and then 'Block choices' and select 'Show thermal port'. The same can be done for for example an IGBT block or a diode.
The thermal ports then need to be connected to a thermal network for which relevant blocks can be found in the 'Foundation Library' under 'Thermal'.