Fear is among the most intense of emotions. It affects the individual on a primal level. We fear that which will harm us: either on the outside or within. And it is one of the strongest motivators there is.
To invoke fear is to reach into a person's depths. In a story, this is accomplished in many ways, but the focus is really on building a mood. As the tension heightens, the reader becomes wary and will jump at their own shadow. Any sense of safety is stripped away, and the world becomes a dangerous place indeed.
In life, calm gives way to anxiety quite easily. Peace turns to peril as we hear about horrible things happening. The natural tendency is to worry about one's own state. The uncertainty bodes ill...
The goal in writing about such things is to amplify the fear, and thus build the intensity. Readers feel secure in their detachment, at first. However, when the literary landscape starts to shift, their confidence is shaken. They are immersed in a world where everything can harm you and no one is safe.
All genres deal with fear to one extent or another: the killer on the loose; the dangers of the battlefield; strange eldritch powers; malevolent alien entities; the lover scorned. Whether the threat is real or imagined, physical or psychological, the character must face it or be overwhelmed. And the reader empathizes, facing a crisis of their own: whether to fight their fear or fly into a safe, warm place within.
Much of the enjoyment of a story comes in witnessing a person being challenged. Will they overcome this trial or succumb to its fury? There is hope for victory and fear of failure. If the situation is dire, and the risk is great, there is a genuine sense of terror and a dawning realization that one's best efforts may not be enough.