You need to tell us. Unless you want a dictionary definition (in which case your go-to resource should be a dictionary, not the TFR forums),
you should be providing an operational definition in light of which you want your other questions addressed as the very first thing. If you leave that definition to others, you risk that every response talks about a different phenomenon.
It almost certainly didn't, not the way you appear to imagine. Depending on what it is you want to talk about, the answer is probably "it's inherited from some early reptilian/amphibian ancestor and hasn't really changed since", or possibly the effect of some post-hoc rationalization of such, but not an independent trait that's in any way typical for humans. Also, though I'm no expert endocrinologist, I believe it's not sharply delineated from other negative emotions (fear, disgust) in terms of the physiological reactions involved, so calling it a unique "psychological trait" as though meaningfully separable from those is probably not tenable.
- what problem of ours does it solve?
Am I getting crazy or did you edit your post? I could have sworn it said "purpose" there just minutes ago. I guess that was in the title instead. Teleology at its best.
Anyway, traits don't exist to solve a problem, they persist because they make it statistically more likely for its bearer to survive. They can do so in roundabout ways, or despite nearly as often killing you. Phrasing evolutionary questions in engineering terms is severely misleading more often than not.