A steam trap serves as an automatic valve, which removes the hot condensate, a byproduct of the heat transfer between the steam and the fluid to be heated in a steam system. The hot condensate is returned to the boiler to conserve its available heat. Likewise, it is also important to remove the condensate from the heat system because if left at the bottom of a system, it reduces the efficiency of the heat transfer and it can cause several types of water hammer and thus, damage the pipe system. Steam traps also remove air and other non-condensable gases as they reduce the efficiency of the heat transfer. Other gases like CO2 and O2 have to be kept out of the system as well because they react to form the corrosive carbonic acid. Steam traps open to release condensate, air and CO2 but close to keep the steam in.
A drain trap serves as an automatic loss prevention valve. Water or moisture may be carried with the air being used in machinery or some tools. Presence of these elements is unwanted because it washes away the lubricating oil within these machines, accelerating wear and tear. In instrument air systems, water can collect dirt causing sensitive instruments to fail. In compressed air systems, excess moisture and oil tend to decrease the efficiency of the gaskets and hoses. Removing water, moisture or oil may be done manually or using a drain trap. A drain trap opens to discharge fluids and closes to prevent air and gas loss.