How exactly does piercing damage work against an enemy? Does it ignore AC? Or am I way off with my idea behind how the damage type works?
Damage, in general, is unaffected by AC. Here's what AC does:
When you make an attack, your attack roll determines whether the attack hits or misses. To make an attack roll, roll a d20 and add the appropriate modifiers. If the total of the roll plus modifiers equals or exceeds the target’s Armor Class (AC), the attack hits. The AC of a character is determined at character creation, whereas the AC of a monster is in its stat block.
So what AC does is determine whether an attack hits or misses. Now, when an attack hits, various things can happen, depending on what sort of attack it was. If it was a spell, then almost anything can happen, depending on what spell it was. But let's assume it was a normal melee attack with a weapon.
On a hit, you roll damage, unless the particular attack has rules that specify otherwise. Some attacks cause special effects in addition to or instead of damage.
If we hit, we roll damage. Simple enough. What damage do we roll?
The Weapons table shows the most common weapons used in the fantasy gaming worlds, their price and weight, the damage they deal when they hit, and any special properties they possess.
So now we go to the weapons table. Let's assume we attacked with a spear. The table says that a spear does:
So if we attack with a spear, and hit, we roll 1d6, and the damage we deal is whatever we get on the roll. Well, almost.
When attacking with a weapon, you add your ability modifier—the same modifier used for the attack roll—to the damage.
So it's actually 1d6 + Strength. But wait, it said 1d6 piercing! What's this piercing thing? Piercing is listed under the damage types section as:
Piercing. Puncturing and impaling attacks, including spears and monsters’ bites, deal piercing damage.
There aren't any special rules for piercing damage, so it follows the normal procedure. So, you might ask, what is it even for?
If a creature or an object has resistance to a damage type, damage of that type is halved against it. If a creature or an object has vulnerability to a damage type, damage of that type is doubled against it.
When you hit, and then deal damage, the damage might be halved or doubled depending on its damage type, and what you're attacking. There's also, in rare cases, immunity to a damage type, which would cause you to deal no damage. There's even weirder things like the Heavy Armor Master feat, which reduces damage of certain types by 3.
In summary: When you roll an attack, AC determines whether it misses or hits. If it hits, you deal damage. The piercing damage type doesn't modify this in any way, but it might come into play when determining exactly how much damage you deal.