How to Parry
You can see a transparent glimmer ahead of you when you hit the button. that is the parry window. You basically have to time that glimmer so the enemys attack touches that.
It’s a small window, and needs practice.
PS: You can extend this parry window with a talent in the Spear tree.