In a perfect world, hydrocarbon would burn to water and CO2, but in the heat of a combustion chamber, there are another bunch of side reactions, that produce CO, NOx, and HC...these reactions are "fast" in forming the reaction products, and "slow" in breaking down, in terms of the combustion cycle...an infinitely slow exhaust stroke, and they'd break down eventually.
(These reactive species are what IMO drives oil antioxidant consumption when blowby hits the oil in the piston/bore).
The catalyst reduces the activation energy on these breakdown reactions so that they too can occur quickly.
The NOx, breaks back into N2 and O-, the CO picks up an O, and goes to CO2, and the HC gets back to H20 and CO2.
They are (IMO) a godsend, as the old pollution controls strangled engines, wasted fuel, and added ridiculous complexity.