It is a one part of exhaust system
Muffler or Silencer as we call it in India, is connected to the exhaust of the engine to reduce noise of the engine. It does so by destructive interference in sound waves similar to destructive interference in light. One back draw of silencer is back pressure to the engine which reduces its efficiency.