If you've ever heard a car engine running without an exhaust, you know what a huge difference the exhaust can make to the noise level.
Inside an exhaust, you'll find a deceptively simple set of tubes with some holes in them. These tubes and chambers are actually as finely tuned as a musical instrument.
They are designed to reflect the sound waves produced by the engine in such a way that they partially cancel themselves out.
Mufflers use some pretty neat technology to cancel out the noise.