All of Yellowstone is bear habitat, even the boardwalks around Old Faithful (and other thermal areas).
Never pursue a bear to take its picture. When viewing bears along roads, use pullouts and stay in or near your car.
Keep all food, garbage, and other scented items stored in bear-proof containers when not in use.
If a bear approaches or touches your car, honk your horn and drive away to discourage this behavior.
Follow the best practices for hiking in bear country: be alert, make noise, hike in groups, do not run, carry bear spray and know how to use it.
If you see someone hurt by a bear, witness aggressive bear behavior, or see a bear obtain or try to obtain human food or garbage, call 911 immediately or notify any park ranger.
Bison
Bison have injured more people in Yellowstone than any other animal.
Give bison space when they are near a campsite, trail, boardwalk, parking lot, or in a developed area. If need be, turn around and go the other way to avoid interacting with a wild animal in close proximity.
Approaching bison threatens them, and they may respond by bluff charging, head bobbing, pawing, bellowing, or snorting. These are warning signs that you are too close and that a charge is imminent.
Do not stand your ground. Immediately walk or run away from the animal. Spray bear spray as you are moving away if the animal follows you.