A heat exchanger is a device that enables effective heat energy transfer between two mediums without them mixing. It heats or cools something by transferring the heat energy through the process of conduction. For example, to keep a car engine cool.
Heat exchangers work differently according to the specific type. They use a combination of conduction and convection to move energy, in the form of heat, from one location or flow to another. They generally operate in a sensible heat range and occasionally engage the stored capacity of state change, enthalpy.
This could mean heating one medium by conducting heat into it. Alternatively, it could be cooling something by transferring heat from it into another medium, such as air or water. The goal is to improve efficiency or safety of a process. Some processes wouldn’t work at all without a heat exchanger.