We consider heat transfer between two thermal reservoirs mediated by a quantum system using the generalized quantum Langevin equation. The thermal reservoirs are treated as ensembles of oscillators within the framework of the Drude-Ullersma model. General expressions for the heat current and thermal conductance are obtained for arbitrary coupling strength between the reservoirs and the mediator and for different temperature regimes. As an application of these results we discuss the origin of Fourier's law in a chain of large but finite subsystems coupled to each other by the quantum mediators. We also address a question of anomalously large heat current between the scanning tunneling microscope (STM) tip and substrate found in a recent experiment. The question of minimum thermal conductivity is revisited in the framework of scaling theory as a potential application of the developed approach.