Most bear attacks occur because the bear is startled by your presence in an area or on a trail. Just because a trail is well used by hikers or joggers doesn't necessarily mean there aren't bears on it or around it. Would you want to walk through a bunch of trees or use a perfectly well groomed trail? One of the biggest preventative strategies to avoiding an encounter is to yell out and let the bears know you are there. Every so often just say, "Hey Yogi" or "I'm here bear" to hopefully lessen any possibility of creeping up on a bear.
Generally if a grizzly bear attacks you its because they are defending their territory and/or their cubs. In every encounter I have read about the people who play dead in this situation tend to be the ones that live. On the other hand you will want to fight back against a black bear, especially one that is displaying stalking behaviour.
If you are charged or attacked by a bear there are some general things you can do:
There are lots of signs that will let you know if a bear is in or frequents the location you are at. For example, tree markings, bear scat, tracks, smell, destroyed vegetation and overturned rocks are tell-tale signs of bear activity. If you are down wind from a bear you will often times get a whiff of something "dirty" smelling. This is important to keep in mind, especially if the wind is blowing towards you and not towards the bear. It is easy to accidentally stumble upon a bear if they cannot smell or hear you.
Black bear track in Ocala National Forest
Bear Tracks - This diagram is from Steven Herrero from the Western Wildlife Outreach