Meeting face to face with a bear may be considered the most intense encounter that any human may have with an animal. Hiking through dense forests, camping in the woods where bears are known to be common, as well as residing near such places where bears occasionally visit, requires an in-depth knowledge about how bears react to situations that may be posed by human beings.
Control Your Initial Reaction

Your instinct tells you to scream, to run. But if you run, a chase can ensue. The best thing is to stop, breathe slowly, and stretch your movements, since bears are extremely watchful, especially regarding movements.
Make Yourself Appear Human and Non-Threatening

Speak in a calm, authoritative manner to inform the bear of your presence as humans. Avoid high-pitched voices, as this is sometimes the sound of prey animals being hurt. Raise your arms slightly to appear bigger to the bear, but also avoid waving them as if attacking the bear.
If Bear Is Not Approaching, Back Away Slowly

If it is not approaching, but instead stationary or sidestepping, back away diagonally, rather than directly backward. This will keep you from tripping and show the bear you are leaving space. Never turn your back or crouch lower, because both postures make you look vulnerable.
Do Not Run Under Any Circumstances

Bears can also run much quicker than a horse over a short period of time. Not only can running lead to a chase, but it can also lead to a fall. Even a charging bear has a high probability of being a bluff charge, where it will stop a few feet away from you if you stand your ground.
Use Bear Spray Correctly and Decisively

Bear spray happens to be an effective deterrent against these animals. It ought to be utilized when the bear comes really near, i.e., at a distance of 25 to 30 feet. The bear spray ought to be projected slightly downward to ensure that the expanding fog goes into the face of the bear.
Stand Your Ground During a Bluff Charge

Bluff charges are common in grizzlies too. Your objective in this situation is to remain stationary and talk in your normal speaking voice; you can spray the bear with bear spray as needed. Remaining stationary often proves to the bear you are not an enemy worth fighting.
Counterattack a Predatory Attack

If a black bear or polar bear were to attack you, having distinct predatory motivation, it would not be suggested to play dead. With any available object, strike at sensitive areas like the face and snout. Aggressive resistance may convince the bear that you are not easy prey.
Avoid Dropping Food

Dropping objects can induce a curious situation or intensify the search for food. Dropping objects should be done only if the bear is engaging the victim, requiring more mobility. Personal safety is the first concern, although dropping objects needlessly might make the situation worse.
Leave the Area and Report the Encounter

If one is in a safe position from the bear, it is also important to leave the area so that a repeat encounter does not occur. Besides that, it is also crucial to inform the local authorities concerning your encounter with the bear so that more people can learn to avoid bears.