To gain a more complete understanding of how mufflers and headers do their job, we must be familiar with the dynamics of the exhaust pulse itself. Exhaust gas does not come out of the engine in one continuous stream. Since exhaust valves open and close, exhaust gas will flow, then stop, and then flow again as the exhaust valve opens. The more cylinders you have, the closer together these pulses run.
Keep in mind that for a "pulse" to move, the leading edge must be of a higher pressure than the surrounding atmosphere. The "body" of a pulse is very close to ambient pressure, and the tail end of the pulse is lower than ambient. It is so low, in fact, that it is almost a complete vacuum! The pressure differential is what keeps a pulse moving. A good Mr. Wizard experiment to illustrate this is a coffee can with the metal ends cut out and replaced with the plastic lids. Cut a hole in one of the lids, point it toward a lit candle and thump on the other plastic lid. What happens? The candle flame jumps, then blows out! The "jump" is caused by the high-pressure bow of the pulse we just created, and the candle goes out because the trailing portion of the pulse doesn't have enough oxygen-containing air to support combustion. Neat, huh?
Ok, now that we know that exhaust gas is actually a series of pulses, we can use this knowledge to propagate the forward-motion to the tailpipe. How? Ah, more of the engineering tricks we are so fond of come in to play here.
Just as Paula Abdul will tell you that opposites attract, the low pressure tail end of an exhaust pulse will most definitely attract the high-pressure bow of the following pulse, effectively "sucking" it along. This is what's so cool about a header. The runners on a header are specifically tuned to allow our exhaust pulses to "line up" and "suck" each other along! Whoa, bet you didn't know that! This brings up a few more issues, since engines rev at various speeds, the exhaust pulses don't always exactly line up.