This is the first point of contact for the exhaust gases after they exit the cylinder head. It's also a commonly upgraded item where heavy cast manifolds are swapped out for tubular headers. The idea behind upgrading to an exhaust header typically comes down to increasing the exhaust piping diameter as well as increasing exhaust scavenging by aligning the exhaust pulses in a favorable fashion.
This is the device which allows you to still breathe the air while you're visiting Los Angeles. It takes the incoming NOx, CO, and unburnt hydrocarbons from the exhaust and “converts” it into much less harmful N2, O2, CO2, and H2O.
It's ideal not to have your exhaust gases pump directly underneath your car, filling your cabin with fumes. You'll need some pipes to route the air elsewhere.
Though it's not a necessary portion of an exhaust, it's often included as it helps to eliminate noise. Resonators work by rejecting sound waves and canceling each other out, and they're typically tuned for a specific frequency in which the engine noise is loud or undesirable.
There are many types of mufflers, but the goal is pretty much the same: eliminate noise. One of the most common ways they work is by redirecting the airflow. Along the way, the exhaust passes through porous pipes which allow the exhaust gases to expand into sound deadening material, minimizing the noise that finally exits the tailpipe.