A safeguard is a defense or precaution. You could describe a flu shot as a safeguard against getting sick, for example.
Safeguards protect against something negative, whether it's an attacking army invading a country or a boy you don't like much asking you to the prom. A store's security system is a safeguard against theft, and a secret password is a safeguard against your sister reading your email. You can use it as a verb too: "We clearly need to safeguard our Halloween candy so Mom and Dad don't steal it after we go to bed."