From TF2 Wiki
A Backstab is a context-sensitive attack with the Spy's Knife that results in a one-hit kill (unless the target is using the Dead Ringer, has the Razorback equipped, under the effects of an Übercharge, or is a scout under the effect of Bonk! Atomic Punch). A Spy may backstab an enemy as long as the enemy is close enough to be hit with a melee attack, and as long as the Spy is within a 180° range of the enemy's back. To indicate that a Spy is within the required range to perform a backstab, his Knife will become primed, with its tip facing downwards. The Knife will remain in this position until the target is no longer in reach, or the Spy attempts a backstab by attacking.
A backstab can be performed while you are disguised, although your disguise will be removed upon attacking, regardless of whether the attack connects with the enemy or not.
A useful technique that can be employed by a skilled Spy is to sap an Engineer's Sentry gun and then immediately backstab the Engineer. As most Engineers will turn to face their Sentry gun to remove the Sapper, this gives the Spy an excellent opportunity to backstab his enemy. Trickier still is backstabbing the Engineer first, then quickly changing weapons to the Sapper and then sapping the Sentry before it is able to turn and fire (this will not work so well on higher levelled sentries, as their turning speed is faster).
The Sniper's unlockable Secondary weapon, the Razorback, prevents one backstab per life (unless the Sniper returns to a resupply cabinet) and stuns the offending Spy momentarily. This weapon makes Snipers less susceptible to backstabbings, and forces Spies to use other methods of attack.
Killing a player with a backstab will sometimes cause a special death animation for that class. This animation has a 25% chance of occuring.
Due to an in-game glitch, a backstab can sometimes occur upon stabbing an enemy in the front of their body, referred to by the community as a 'facestab'. While these problems have been reported to be fixed in the developer notes accompanying various patches, facestabs do still occur occasionally (this is most likely due to lag). Another glitch is where you are on an enemy's head, sometimes you would "headstab" them. But this glitch is quite rare.
Another community-coined term, is the 'failstab', which refers to a backstab which should have succeeded but instead did only normal Knife damage, despite the backstab animation playing fully and the Knife connecting. Failstabs are often caused by lag compensation.
- Due to the nature of achieving a backstab, it is technically impossible to score a non critical backstab.
- Originally the Spy's backstab animation was just over a second long and manifested as the current animation but slowed down. This was changed to the current, sped up version we have today in the interests of balance.
- There are several community-devised specialist techniques when it comes to backstabbing, such as the aforementioned Stab'n'sap, or the Stairstab (which involves leading a target up a stairwell and jumping over them to stab them as they run up), both of which requiring some level of practice.
- An Ubercharged spy can backstab a Ubered enemy.
- It's possible for an allied medic to appear to be dominating you after assisting your death by healing an enemy spy as he stabs you.
- Stairstab: Stand at the top of the stairs, facing down at an enemy approaching you. Run forward and jump, turning in mid-air to stab them in the back. This technique can be difficult to master, but it is also difficult to protect against, as the enemy has to turn almost completely around to avoid it.
- Spinstab: While an enemy is running towards you, let them run past you before spinning and stabbing their retreating back.
- Facestab: After your foes notice that you're not one of them, and if they'll charge at you with melee weapons, try to avoid their hits by moving right-left in the rythm as your enemies strike. After you successfully avoided it, make an attempt to stab them in the back, each time, when they miss. This is more like for skilled spies, and clearly effective, because the others won't see through this technique for a long time. This method is similar, and based on the *Spinstab's tech, but it works whitout being inkognito, being offensive.
- Leaping Stab: In a leaping stab you find your way to some sort of high place, and then you jump off, ideally falling just behind the enemy to backstab them, it takes good timing, but if pulled off can be extremely rewarding. This is extremely vital with Your Eternal Reward because it helps you to get your first disguise, and if you jump on the last person of a group, you could potentially backstab the majority of the group because Your Eternal Reward keeps back-stabbed enemies from screaming.
- Stalking Stab: A stalking stab is performed by lurking directly behind an enemy while cloaked, and running against them, you then uncloak and hold down mouse1 so that you stab as soon as possible. Very important for Your Eternal Reward because if you were to do this just outside of a spawn, the enemy would not be wary of spy yet, and likely wouldn't have any team-mates around them to kill you after you stab them.
- Moving efficiently: Learn to utilize shortcuts and tricks of the map to catch up to faster-moving enemies such as Medics and Scouts.