The first part of the story is introduced by a framing device. We're told that the story has been found among the possessions of its late narrator, Diedrich Knickerbocker. The framing device is meant to give the tale an element of historical credibility, to make it seem less like a fantasy and more like a series of events that actually happened in real life.
Once the story is up and running, we are introduced to Tarry Town and its colorful inhabitants, as well as the nearby valley of Sleepy Hollow. Although we're introduced fairly early on to the story of the Headless Horseman, it won't be until the second part of "The Legend of Sleepy Hollow" that we will see him in action. For now, he's mentioned solely as a way of illustrating just how much people in this neck of the woods love to tell each other ghost stories.
Roughly speaking, one could say that the first part of the story is mainly concerned with Ichabod Crane's courtship of the comely Katrina Van Tassel. That doesn't mean it's a love story in the conventional sense—it's much too humorous to be that—but a good deal of the first part of the story is taken up by Ichabod's vigorous attempts at wooing Katrina.
The second part of the story is more of an out-and-out ghost story. The most significant episode here is, of course, Ichabod's frantic ride to escape the Headless Horseman. That this fantastical ghost story should take place after the more conventional narrative of Ichabod's courtship of Katrina is entirely deliberate. If Irving had gone straight into the Headless Horseman business, then we would've had a straightforward ghost story. But "The Legend of Sleepy Hollow" is so much more than that. As well as being a tale packed with humor, it's also a cultural portrait of the New York Dutch that Irving knew so well.
The postscript, in which Knickerbocker tells us that he first heard the story from an old man in Manhattan, teases us as to the veracity of the story. The old man famously says that someone who races goblin troopers will probably have a rough ride in life. So, if a country schoolteacher fails to win the heart of a Dutch heiress, then he is certain to achieve success in politics.
The ambivalent tone of the postscript keeps us guessing as to whether or not we're supposed to take any of this seriously. Perhaps someone of Ichabod's dreamy, romantic temperament really can make it in politics. Or perhaps this is just a clever satire. Either way, Irving is determined not to tie up any loose ends—and to keep us guessing.