To ward off a danger or illness means to prevent it from affecting you or harming you.
She may have put up a fight to try to ward off her assailant...
Mass burials are now under way in an effort to ward off an outbreak of cholera.
PHRASAL VERB : V P n (not pron) , V P n (not pron) , also V n P