When discharged, a firearm makes sound from three sources:
Muzzle blast — shockwave generated by high-pressure gases escaping and expanding from the muzzle after the projectile exits the barrel and breaks the functional seal restraining the gas inside the bore.
Sonic boom — sharp bullwhip-cracking sound associated with high-frequency shockwaves caused by an object (in this case, the bullet) flying supersonically through the air.
Mechanical noise generated by the internal moving parts of the firearm action.
A silencer can only affect the noise generated by the muzzle blast
A silencer, also known as a sound suppressor, suppressor or sound moderator, is a muzzle device that reduces the acoustic intensity of the muzzle report (sound of gunfire) and eliminates muzzle flash when a gun is discharged, by modulating the speed and pressure of the gas ejection from the muzzle and hence suppressing the muzzle blast.
Some believes that well-built suppressors reduce felt recoil and they reduce muzzle rise and eliminate the concussive effect felt by the shooter.