By being fast, strong, and intelligent. Work out, run regularly to improve your stamina, and research how to survive in the wild on your own. Zombies are slow and very stupid - this should keep you safe. Or, you could become a scientist and invent a formula that vaccinates people against becoming zombies in the first place.