To deflect an enemy attack simply tap the Guard button (L1/LB) as an attack is coming; this negates all damage from most attacks, builds up the enemies Posture gauge by a significant amount, and staggers most enemies briefly, allowing you a small window to counter attack. The time window to deflect enemy attacks is actually a generous 30 frames by default (a full half second before the attack hits), though this window shrinks to 7 frames if the user has recently released the Guard button; as such, spamming the button in hopes of a successful deflect is not recommended. Similarly, holding the guard button down and releasing immediately before a Deflect attempt makes the Deflection dramatically harder. Still, one can simply guarantee a successful defense by pressing down the Guard button earlier rather than later: if properly timed, the Deflection attempt works, while if too early, the user will simply Guard the attack instead.
Enemies can also deflect your attacks, but it will not deal any Posture damage; you will generally recover slower than your opponent after your attack is deflected, however, making follow-up attacks risky or impossible.
Some enemy attacks, called Perilous Attacks, are dangerous or impossible to Deflect, you have to deal with them in certain ways; a red Kanji meaning "danger" will appear to indicate Perilous Attacks. Other attacks will deal damage to Sekiro whether he deflects or guards them: attacks which inflict the terror or fire status effect will almost always deal a portion of their damage through Sekiro's guards and deflects, though a weapon blessed with Divine Confetti can Deflect terror attacks from apparitions. Similarly, the negative status effect buildup of Poison, Fire, and Terror cannot be blocked using a traditional guard or deflect.