Every answer here has a little truth, a little BS, or forgets a few minor details so ill throw in my answer.
My favorite answer is Gentlewolfs. In theory every gun can have a suppressor mounted to it. It may take removal of the front sight or replacing the barrel with a longer barrel so that the muzzle can be threaded. Once it's threaded you buy a suppressor with matching threads and screw it on. Not every gun will work effectively with a suppressor though. Here's why:
When a gun fires there are in fact 4 sounds:
1. The pop of the primer setting off the powder. This isn't really that loud.
2. The powder combusts from the primer and creates gases. These expanding gases is what pushes the bullet it out. When they leave the muzzle, you hear a sonic crack of the gases crashing into the atmosphere.
3. The sonic boom of the bullet breaking the sound barrier.
4. The bullet making impact on the target.
Sound #1 isn't that loud. Sound #3 will happen with or without a suppressor. The shooter needs to shoot subsonic ammo to prevent it. Sound #4 is negligible when suppressing gunfire to mask the shooters location.
Sound #2 is the purpose of the suppressor. It controls the expanding gases and prevents them from creating the massive sonic crack of them crashing on the outside atmosphere. Like Gentlewolf said, most revolvers are ineffective at being suppressed. It's due to the gases escaping through the gap between the cylinder and the barrel. The suppressor doesn't stop them. One revolver, the Nagant revolver from Russia, actually presses the cylinder into the barrel when it fires, sealing most of the gases inside of the barrel where they will be forced to fire out of the muzzle where the suppressor may be attached. I think in WW2, some countries actually experimented with suppressing this revolver.
And like others have said, you cannot fully silence a gun so its actually called a suppressor and silencers are just Hollywood myths.