All cars have an exhaust system. Some are loud, some are quiet, and some are just totally broken. And some of them have a tip that functionally does absolutely nothing, but cost $15 and take an entire day to put on and don't even turn blue when you burn them. But what do they do? Well, simply, they filter dangerous and environment harming chemicals out of the exhaust, as well as quiet down the car quite a bit. But the way it actually works is the catalytic converter creates an oxidizing effect on the gas that passes through it, replacing harmful gasses such as carbon monoxide with less harmful gasses such as carbon dioxide, as well as reduce the amount of nitrogen oxides that are emmited. Mufflers work by having a fiberglass lining that absorbs some of the sound, as well as acting as a resonating chamber that creates destructive interference getting rid of a lot of the noise. This is essentially how an exhaust system on a car works, and thigh it's not perfect, it's actually a really cool system that serves a great purpose.