If you observe a drop of water splashing in a sink, you can watch the ripples move outward from the point of impact. These small waves bounce off of the sides of the sink and back into other waves. When one wave meets another wave moving in the opposite direction they cancel each other out and eventually the surface of the water is still again.
In the same way, sound is a pressure wave, and the same principles that can be seen at work in the sink are used in mufflers. A muffler is a metal box filled with baffles, which are metal walls that reflect sound waves. When these waves collide, they cancel each other, quieting the exhaust.
While this decreases noise, it also increases backpressure. This backpressure increases the force that must be used for the pistons to push spent gasses into the exhaust system, hurting performance. Performance mufflers use fewer baffles than a standard muffler or have the baffles arranged in a way that decreases backpressure. However, if there is too little backpressure air, fuel from the intake can flow right out of the cylinder, which results in lower power, and in severe cases, burnt valves.
Glass packs and silencers are metal tubes covered in a layer of fiberglass. Instead of reflecting sound like a muffler, this insulation absorbs some of the sound waves. This is less effective at quelling noise, but it produces much less backpressure than a traditional muffler. Manufacturers often use silencers together with traditional mufflers to lower noise levels while enthusiasts will often replace mufflers with glass packs for less backpressure and a louder exhaust sound.
Shops that can bend their own pipes will be far cheaper than those that only use pre-bent systems. They can also build custom exhaust systems.
Ask for fully aluminized mufflers. These mufflers have an aluminum coating on the steel pipe which helps it resist acids in the exhaust. Cheaper mufflers will have an aluminized case, but the inside will be mild steel. Stainless steel lasts the longest but can be prohibitively expensive.
The cost of a performance muffler is tied directly to its advertising costs; most of these mufflers use similar designs and are indistinguishable once you get them on a car.