First of all. If you have no idea what a silencer is, visit this link.
Now for those of you wishing to build a suppressor for your home made spring piston or PCP air gun, the first thing you need to know is that just because it looks like it should work, doesn't mean it will, so drilling holes into a piece of PVC and then wrapping it with cloth will not suppress your gun.
Silencing a firearm (real gun) involves filtering and dissipating the explosion and gas that escapes the barrel by using a series of complex spacers called baffles. Similar to the muffler on a car.
In an airgun, air escapes the barrel in a sharp loud gasp behind the projectile and in order to suppress this gasp a cylindrical device is attached to the barrel. Inside this cylinder/can not much wider than the barrel is Felt cloth. Felt cloth is used for various sewing and material purposes including as a piano keyboard cover.
This Felt cloth is glued in a perfect shape to fit the inside walls of the cylinder body so that the air which escapes the barrel is softy absorbed against the walls: See below.
Spring Piston Air Guns have too much mechanical parts in order to be as well suppressed as a PCP.
However if you construct a PCP airgun and build the silencer just right you will get great results.