We used to, as boys and each in turn while we were walking through the woods with our rifles in our hands, ask our dad what we should do if we see a bear.
He explained to us the first thing you want to know is whether it is a mother and cubs and if it is, make sure you’re on the opposite side of the mother from the cubs. She will not leave the cubs to come after you but if you are between her and the cubs, you are in a dangerous spot.
He also told us there’s no point in climbing a tree to get away from a black bear, in spite of what people might tell you, because the black bears where we live are pretty good at climbing trees because they have retractable claws, like a cat.
Dad told us, if you see a grizzly, just stand still and hope he goes away because they can run very fast and, even though they can’t climb a tree, they can knock them down. If you do get to climb a tree when a Grizzly is around, make sure it’s a sturdy one or he’ll just knock it over.
Most of the time, however, bears aren’t really interested in attacking you. You aren’t their kind of food.