Camping, stay put, lie still and quiet. Food and food odors attracts bears.
In your car, stay put and do not roll down windows.
All bears are dangerous. A bear with a cub is extremely dangerous. There is no safe distance from bears. Many bears can climb trees so this is not a good option. Do not run or take photos or toss snacks. You cannot outrun a bear. Back away slowly.
Seeing bears, making noise may scare then away. Bears do not like to be surprised. Think bells and whistles.
If you must fight back, go for the eyes and snout.