They are two sides of the same coin. Pain signals go to several places in the brain: the sensory centers ("my toe hurts right here") and the aversive conditioning center in the amygdala. The amygdala also receives signals from all over the brain, so when pain causes it to activate, it learns what was happening around the time of the pain. In the future, it will tend to produce an output signal that can activate protective programs elsewhere in the brain. In childhood, social activity wires it up to language and cognitive inputs too ("Did you get an ouchie?"), so that it can be used in all sorts of aversive behavior, not just avoiding physical injury. It's probably not a coincidence that social suffering is the language of pain: heartache, being stabbed in the back, etc.
> So most of the dangerous situations we actually encounter, we deal with using reason and learned behavior rather than fear instinct.
Most fear IS learned behavior; instinctive fears are quite simple. For example, The Gift of Fear  describes a man who walked into a convenience store, and for no reason he could explain turned right around and walked back out. Seconds later a cop walked in and was gunned down by robbers. Later the first guy replayed his memories and realized that the running car out front and the strange look the clerk gave him were probably the reason, but at the time logic and reason were nowhere to be seen. In fact the author of that book says that relying on logic is a good way to get yourself hurt. (Logical thinking has a very narrow range of focus in adults and easily misses hazards, but the amygdala constantly listens to the full range of senses and thoughts all at the same time.)