The theory behind heat transfer