A quantum dot driven by two ac gate potentials oscillating with a phase lag may be regarded as a quantum engine, where energy is transported and dissipated in the form of heat. In this chapter we introduce a microscopic model for a quantum pump and analyze the fundamental principle for the conservation of the charge and energy in this device. We also present the basics of two well established many-body techniques to treat quantum transport in harmonically time-dependent systems. We discuss the different operating modes of this quantum engine, including the mechanism of heat generation. Finally, we establish the principles of quantum refrigeration within the weak driving regime. We also show that it is possible to achieve a regime where part of the work done by some of the ac fields can be coherently transported and can be used by the other driving voltages.