How does Armour work in Savage Worlds?

I am a bit confused about how Armour and Armour Piercing is meant to work.

If you have a Toughness of 8 and Armour of say +2 (10) and you are hit by a weapon with AP 2. Do you take 2 off for the AP so it is back to 8 first. Or does the damage need to be more than 10 and then you take the 2 off to determine the result?