Anyone who reads or writes horror fiction or consumes it in video form understands what it is. Horror is a feeling of intense terror, dread, or EEK! Horror fiction needs to cause that, or it's probably something else (or just bad).
Of course, not everyone is afraid of the same thing. One person squirming uncomfortably over the gruesome ranks of shambling corpses may not care if you dangle giant radioactive spiders over her head. Someone for whom that spider is the stuff of nightmares may yawn at a gothic mansion populated by the ghosts of long-dead murder victims intent on revenge.
Writers can't possibly cater to everyone's fears. They choose one (often one they struggle with themselves) and write about it with the intent to scare other people. But how?
Sitting down, perhaps in the dead of night when a storm is clattering tree branches against the house, with intent to write a story that scares people presents several challenges. First, you need all the stuff that normally goes into quality fiction: setting, characters, conflict, etc. Then you need to use all of those things to create that feeling of dread or disquiet. Jump scares, popular in horror games, TV shows, and movies are almost impossible to pull off in written work.