It's a well known strategy for fending off a bear attack. Play dead. If a bear is attacking play dead. I've heard people say it a lot, but unfortunately playing dead isn't always the best coarse of action. It turns out general bear safety is much, much more complex than hitting the dirt and covering you neck.
The first rule of bear safety is the same as thing as general safety. Be aware of your surroundings and avoid the trouble. It's simple, the bear cannot attack you if you are not where the bear is. If you are out hiking, camping, fishing, hunting or anything else and you see a bear, respect the bear, give it the space it needs and do not aproach the bear, but slowly back off. That goes double for cubs. Sows are extremely defensive of their cubs, and they will fight to the death to protect them. Just because you can't see the sow does NOT mean it is not there.
Obviously you should never feed a bear, we've all heard this about a million times. The reason is, beside it being illegal in some areas, that bears are not dumb. If humans continually feed bears, the bears will start to equate humans with food. Bears will start to pester people for food, and even attack them to gain that food from them. Continuing in the same vain of bears and food is something I've often seen campers (myself included) do that really they shouldn't. Do not cook food near your camp. 100 yards or more should be placed between you and food, and you should cook you food in a spot with a good field of view down wind of your camp so you can be aware of any approaching bears. Keep in mind bears will more than likely approach from down wind. Cooking during the day is also a good idea.
Ok, so now that we've briefly covered avoiding bears, what happens if you just can't avoid a bear? It happens, people stumble onto bears and sometimes bears stumble onto people. The first step is to identify the bear. Is the bear a black bear or a brown bear? Best way to identify a brown bear is they have a distinctive hump on their back around their shoulders. They also tend to be much larger than black bears. The Alaska Science Center ranks the following as the most likely reasons for brown bear attacks: Surprise, curiosity, invasion of personal space, wound, defense of carcass or kill, and a provoked charge. These reasons are why "playing dead" can work. Grizzly bears are far too large to escape a dangerous situation by climbing a tree the way a black bear will, and so the only options they have is to run on foot, or fight it out. If the threat to the bear "dies," there is no longer a threat, and the bear should leave you alone.
This in mind the first thing you should do when confronted with a bear is not to drop to the ground. If unarmed you should slowly begin to back away from the bear, if you can do so safely. If armed (with ether pepper spray or a fire arm), you should still continue to try to slowly back off. I would suggest carrying pepper spray, as it does work, however it is always a good idea to have a back up. If however the bear does not back off, try dropping a hat. The bear may become more interested in your hat than you, allowing you time to get to safety. Never drop food, as this will only train the bear to attack others for food.
If the bear still continues to follow you try making noise to scare off the bear. I always carry a whistle with me when I am in bear country, as it has a chance to scare off the bear and brings the added benefit of alerting anyone else in the area of a potentially dangerous situation.
Ok, so you've done everything you possibly can and this bear still won't leave you alone, or worse yet, it's charging at you. If you have that pepper spray or a weapon, now might be a good time to use it. For general information according to the Alaska Science Center the most effective firearm against a brown bear attack is a 12 gauge loaded with slugs, and remember, if using a firearm, always shoot to kill. This is also the time where knowing what type of bear is attacking you will come in handy. Playing dead works with Brown bears, it more than likely will not with black bears. The majority of black bear attacks occur when the bear has mistaken a human as a food source. If any bear has mistaken something for a food source, playing dead will not stop the bear, only fighting it off will.
So, if the bear is a brown bear, and your left with playing dead, it's time to drop the the ground. If you are wearing a pack, get the pack over your neck and ball up. If you are without a pack, use your hands to cover your neck. You want to protect your neck, face and chest as well as you possibly can. If the bear stop and leaves you alone, attend to what wounds you can and get out, get help, and get safe. If the bear does not stop, you will have to fight back. Punch, scratch, gouge, whatever it takes. Don't be afraid to attack the bear's eyes.
If the bear is a black bear, and it is attacking you, your best bet is to just fight it. Arm yourself with what you can, rocks, sticks, dirt. The one thing to remember is if the black bear is attacking you, there is a good chance it will not stop until you have scared it off, or you are dead. Fight like your life depends on it, because chances are it does. Back in August of 2008, John Pala saved the life of his 8 year old son when he fought off a black bear that had attacked the boy.
Those these are good generally guidelines to follow, if you are going to be in bear country often, I suggest picking up a survival hand book with a section on bears. Also, picking up some bear spay would be a good idea as well. And remember, traveling with a friend is not only enjoyable, but safe.