Thermal Boundary Layer or Thermal Boundary Layer Thickness:
As the resistance exist between the layers and surface for a viscous flow, there will be a friction, hence heat is generated. Now when the fluid flows over the surface, it receives the heat from the surface if it is cooler than surface and it losses the heat to the surface if it is hotter than surface.
We know that, when the fluid’s temperature increases its density decreases, under this principle, when the fluid layer exchanges the heat its density also changes. Let us assume the fluid is cooler and the surface is hotter. When this fluid flows over the surface, its receives heat from the surface, hence its density decreases, and it moves to top. now the adjacent one has low temperature and high density than the later one, so it will come down i.e adjacent to the hot surface and receives heat, this same phenomenon takes place between surface and layers. Now the first layer heated will be at top most position than all layers since it has high temperature. In one condition the first layer temperature will reach free stream temperature as it exchanges the heat between layer to layer while going to top position , after that its temperature will not change. Hence there is a region with low temperature to high temperature between surface and free stream, this region is called as thermal boundary layer or thermal boundary layer thickness. if you take fluid is hotter and surface is cooler, the heat exchange will be reversed and same region will be there.