Silencers were (and still are, I believe), totally 100% no strings attached legal in NZ, and when I was growing up there I did a fair bit of shooting with silenced rifles and handguns.
One of the rifles was a Stirling .22, in which the barrel was also the silencer (much like on the MP-5SD 9mm SMG), and when you pulled the trigger, all you could hear was a muffled “Click”, and a rabbit would suddenly drop dead 25m away. Very cool.
Silenced pistols (great for indoor ranges!) made a muffled “Shuonk” noise when fired (just like something out of a James Bond film, actually!), but their range is greatly reduced (a silenced .22 might get 15m of accurate shooting- 10m to be on the safe side). Silenced 9mms made a similar noise, but the silencer really affected their accuracy at anything beyond 15-20m or so.
As for how they actually work:
Silencers have a series of vents or “Chambers” in the silencing tube that allow the gas and soundwaves to “expand” behind the bullet, noticeably reducing the sound of the gunshot.
As others have noted however, it’s all a moot point if you’re using Supersonic ammunition (can you say Sonic Boom?)
It’s worth mentioning that the only revolver that can be effectively silenced is the Nagant M1895. The NKVD (forerunner of the KGB) used these during WWII for, well, the sorts of things you’d expect the NKVD/KGB to be using silenced handguns for.
Oh, and while I’m here:
“In the West, you silence gun… in Soviet Union, gun silences you!”
I’ll get my coat…