A safety is a device that helps keep you from doing bad things, like the safety on a gun that prevents you from pulling the trigger accidentally.
Safety, besides meaning "the state of being safe," is used for things that promote safety. If you designate a special meeting place in case of emergency, that place is a safety. If you use contraception during sex, that's also a safety, to prevent pregnancy. In football it's a safety if a player is tackled behind his own goal line. And if you hit the baseball in a way to ensure you reach the base, that's called a safety too.