To call any sort of stab vest "proof" is a misnomer. There are no vests that are completely impenetrable by knives. There are vests that are resistant to knife penetration, though, which is why this form of body armour is called a stab-resistant vest, or simply a stab vest. These vests are specifically designed to protect against blades and improvised stabbing weapons, as well as pointed weapons such as ice picks that have no edge.
When a piercing object, like a nail or a hypodermic needle, goes through cloth, it doesn't damage the cloth as it goes through. Rather, the point slips between the threads and then pushes past, the same way a needle does when sewing. This is why the tighter a material's weave, the better it will protect the wearer against stabs.
When a fabric is stabbed with a knife, the process works a little differently. The point of the knife slips through the weave of the fabric and the cutting edge follows. The cutting edge actually damages the fabric, slicing through it to create a rent in the fabric. Knives are easier to block than smaller items like ice picks, though.
A stab vest has to have a very tight weave to its fabric. If the weave is tight, then it prevents the point of the weapon from ever slipping through the fabric in the first place. This means that the stabber has to put a lot more force into breaking the fabric of the vest.
Heavy nylon or Kevlar material is used to make a stab vest harder to damage. If the material is much more resilient and difficult to damage, in addition to being a very tight weave, then the force that's needed to penetrate the stab vest increases, and it becomes less likely the wearer will be hurt by a weapon.
Some stab vests also include PVC or metal inserts in them. These inserts provide additional ballistic protection to make the vests viable against small calibre bullets as well as knives and other stabbing weapons. These vests are more expensive, but they also offer superior resistance.