The fight or flight response and the release of dopamine can give people a natural high. Both of these things are very likely to happen in a horror movie. Note that a person won't enjoy the fight or flight response unless he knows he is 100% safe.
One of the best ways humans escape from stress and worrying, is to change the world they are living in. When people watch a movie, their subconscious minds believe that they are living a different life and as a result they manage to escape from their lives for the duration of the movie.
Sometimes life gets so boring that it becomes very hard for a person to find anything exciting. Because horror movies provide enough thrill, they are usually a great choice for people who feel bored (See also Why some people like horror stories).
Venting is a popular method of treatment for different suppressed emotions. Releasing suppressed emotions is one of the best ways to feel better. Horror movies allow people to be afraid and so help them release some of the fears they already have (See why some people believe in ghosts).
The human brain gets bored of repetitive things and gets attracted to new things. Science fiction and horror movies can provide enough novelty to excite a bored brain.
When people identify with movie heroes, they subconsciously think they are the heroes. When the hero faces fear and challenges the evil spirits, the audience feels better about themselves because of believing that they have done the same.
On the unconscious level, some people want to prove to themselves, and to others, that they are brave. Being attracted to horror movies could be the unconscious mind's way of achieving that goal.
If someone is afraid of ghosts and spirits he might start getting interested in horror movies in order to deny the existence of his fears. By watching horror movies, that person is sending a message to his mind telling it that he is not afraid.
Horror movies allow people to release their aggression in a harmless way. It can also allow sadists to experience relief after watching so many people suffer in the movie.
When people see someone else suffering they feel good about themselves, because they realize that their lives are better than they had thought. Now when people see actors suffering, they might feel even better because they don't experience any guilt when they watch them suffering.
People who don't fear horror movies can feel superior to those who feel scared, and this gives them a pleasant feeling. These people might feel like they want to see a horror movie because of the unconscious desire to feel superior.
Anything that a movie hero does, your subconscious mind will believe that it did it too. If the hero you identify with is learning something new and managed to beat the devils, your subconscious mind will believe it learned the same skill.
Some people go for horror movies in an attempt to make themselves braver. By confronting their fears, these people manage to increase their personal courage.