When I DM, I usually check the attack roll. If it missed by 7 or less, I'll say that it bounces off an invisible force in between the character and his target. Since Shield is an exceptionally common defensive spell, most characters quickly figure out what that means (there are only a couple other ways to get invisible fields of force--Mage Armor, Bracers of Armor and Rings of Deflection, IIRC).
As for NPCs, I typically figure that experienced villains and/or wizards, sorcerors, or their companions have some contact with the Shield Spell. If they can, they'll step behind it. Otherwise, they'll either live with the fact that they probably won't hit (and fight defensively, etc to duplicate that for the PCs), use dispel magic, or attack someone else.