Dave explains how to attach an SMD power transistor or regulator to a case to use as a heat sink in this design tutorial. And in the process talks about thermal design, the electrical/thermal analogy, and thermal vias.
This is Part 15 of the µSupply Power supply design series. Other videos are here: https://www.youtube.com/playlist?list=PLBF35875F73B5C9B5