I have a D&D 3.5 character who has gained 3 energy resistance to fire due to an item. 

My question is. Does the energy resistance add 3 to AC when dealing with fire attacks or does it negate 3 of the damage when dealt a successful fire attack such as fireball?