Pain is an unpleasant physical reaction to an actual threat (e.g., hitting your thumb with a hammer) or perceived threat (e.g., seeing the hammer coming dangerously close to your thumb). The sensation you feel is not just sensory, biological, or physical—it is also affective, emotional, psychological, and social.
For example, most women who go through childbirth report having felt intense physical pain. Yet psychologically, they still perceive the experience as being positive. A mother sees her pain as natural and not threatening. The joy of meeting her newborn also plays a role in altering her perception of the pain she suffered.
But unfortunately, in most cases, pain is associated with a negative experience—a car accident, cancer, or a chronic disorder like fibromyalgia.