To parry an attack, you must click the icon on your screen at the right time (which will show up when an enemy you are not engaged with tries to attack you) or you can also press the 'A' key on your keyboard when the icon is on screen for the same effect.