Hostility is a form of angry internal rejection or denial in psychology. It is a part of personal construct psychology, developed by George Kelly. In everyday speech it is more commonly used as a synonym for anger and aggression.
In psychological terms, Kelly defined hostility as the willful refusal to accept evidence that one's perceptions of the world are wrong. Instead of reconsidering, the hostile person attempts to force or coerce the world to fit their view, even if this is a forlorn hope, and however harmful the cost.
Whilst testing theories against reality is a necessary part of life, and persistence in the face of failure is often a necessary part of invention or discovery, in the case of hostility there is the distinction that the evidence is not assessed and a decision made to try again. Instead the evidence is suppressed or denied, and deleted from awareness - the unfavorable evidence which might suggest a prior belief is flawed is instead ignored and wilfully avoided. Psychologically, it can be said that reality is being held to ransom, and in this sense hostility is a form of psychological extortion - an attempt to force reality to produce the desired feedback, in order that preconceptions become validated.
In this sense, hostility is a response which forms part of discounting of unwanted cognitive dissonance.