Headers are one of the easiest bolt-on accessories you can use to improve an engine's performance. The goal of headers is to make it easier for the engine to push exhaust gases out of the cylinders.
When you look at the four-stroke cycle in How Car Engines Work, you can see that the engine produces all of its power during the power stroke. The gasoline in the cylinder burns and expands during this stroke, generating power. The other three strokes are necessary evils required to make the power stroke possible. If these three strokes consume power, they are a drain on the engine.
A good way for the engine to lose power during the exhaust stroke is through back pressure. The exhaust valve opens at the beginning of the exhaust stroke and the piston pushes the exhaust out of the cylinder. If the piston has to push any resistance to force the exhaust to vent, power is wasted. The use of two exhaust valves instead of one exhaust valve improves flow by making the holes through which the exhaust passes.
In a conventional engine, once the exhaust gases leave the cylinder, they end up in the exhaust manifold. In a four- or eight-cylinder engine, four cylinders use the same manifold. From the manifold, the exhaust gas flows into a pipe towards the catalytic converter and muffler. It turns out that the manifold can be an important source of back pressure because the exhaust from one cylinder creates a pressure in the manifold that affects the next cylinder that uses the manifold.
The idea behind the exhaust pipe head is to eliminate the back pressure of the manifold. Instead of a common manifold shared by all cylinders, each cylinder has its own exhaust pipe. These pipes are clustered in a larger pipe called a collector. Cut and bend each tube so that each one is the same length as the other tubes. By making them the same length, it guarantees that each cylinder's exhaust gases arrive in the collector spaced out equally so there is no back pressure generated by the cylinders sharing the collector.