The usual advice on what do do when confronted by a cougar is to stand your ground, look big, and fight back. It turns out that running away may be a better idea.
The Los Angeles Times' Outposts blog reports on a U.C. Davis study that reviews cougar encounters and found that fleeing is usually the best strategy. Standing your ground might give the cat the impression that you are too weak or injured to run away, and are thus an easy target.
Of course, cougar attacks are extremely rare -- you're far more likely to be injured by a domestic dog. The best way to keep safe is to avoid hiking alone.
Photo from the California Department of Fish and Game