The previous posts to this question address the topic are quite well. I would like to suggest one more element. There is a thematic idea at play in Irving's work. Being a part of the new American Romanticism movement, "The Legend of Sleepy Hollow" represents how American thinkers were delving into the idea of the supernatural, or how something may exist that is "not of this world." An element of Romanticism is the idea of how rationality is not always the answer to what plagues at the heart of all human beings. Another way of phrasing this is that Romanticists believe that emotions, not reason, can hold the key to a better understanding of ourselves and the universe. Certainly, seeing Ichabod Crane, replete with formal education and knowledge, would prove as a testimony to this; Crane knows a great deal, but still is willing to concede, through his fears, that there is another realm outside of his rational one. Another thematic idea at play here is the developing notion of the author deliberately creating an ending that is not a formulaic or "happy" one. Perhaps, Irving is being cognizant of his place in the pantheon of American Literature in his development of an ending that is not comedic, in the Platonic sense. That is to say, there is not a "noble lie" that will neatly present itself to the reader. Rather, Irving delves into a dark terrain of the ending that is suspended. We simply do now know if there is a Headless Horseman figure or if Brom Bones tried to one up his rival for Katrina Van Tassel. This idea of the author being able to defy social conventions, namely the "happy ending," is another tenet of the Romanticism, which believed that the author was creator and had an aesthetic responsibility to challenge their readers. In American literature, we can see this with the works of Melville and Thoreau, and certainly, with Irving and his understanding of the Crane character.
Ichabod Crane of "The Legend of Sleepy Hollow" has a penchant for tales of the supernatural, enjoying the "direful tales" of Cotton Mather's History of New England Witchcraft, which "flutters his imagination." Another source of his "fearful pleasure" is to spend "long winter evenings with the old Dutch wives" as they sit spinning their cloth and tales before the fires of their cottages. Thus, he feeds his imagination with superstitious tales," even contributing to the gossip by delighting the women
by his anecdotes of witchcraft, and of the direful omens and portentous sights and sounds in the air, [and with] speculations upon comets and shooting stars; and with the alarming fact that the world did absolutely turn round....
However, Irving writes that if there were
pleasure in all this, while snugly cuddling in the chimney corner of a chamber that was all of a ruddy glow...where, of course, no spectre dared to show his face, it was dearly purchased by the terrors of his subsequent walk homewards.
When Crane walks in the night, his imagination and his past knowledge of Mther's book work against him, igniting his fears. He often dreads "to look over his shoulder."
Finally, these terrors of the night are added to the "perplexity" of loving a woman. Ichabod loves Katrina Van Tassel, but another man, much bigger and stronger, desire her, too.This man, Brom Van Brunt, contributes to Crane's fear one evening at the Van Tassel "castle" where a gathering is celebrating. Added to this intimidation, Ichabod hears many tales of ghosts and apparitions, including that of the "favorite spectre of Sleepy Hollow, the Headless Horseman. After his rejection by Katrina, Ichabod "sallied forth" into the night, "quite desolate and chop-fallen" into the "very witching time of night." In this state of mind, all the stories of goblins and ghosts enter the vivid imagination of Ichabod. When he thinks he sees the Headless Horseman, who is probably Brom Van Brunt," an emotionally dejected and mentally defeated Ichabod who is already fearful of his robust romantic rival becomes terrified.
I think the best way to understand Ichabod Crane is to see his character from the perspective of human nature. We as humans often want to believe the supernatural, so we sometimes allow our emotional sides to overtake our minds rationalization.
In addition to this, we are told that Ichabod has a fondness for ghost stories. He likes to tell them and listen to them. Then we can even add another factor. Being an educated man, Ichabod would have more idle hours than most men when he is alone with his books and his thoughts. Add a vivd imagination to a spattering of ghost stories and we can see how Ichabod Crane, the schoolmaster, was easily manipulated by the local lore.