Outline your novel completely, making sure you know how the action will proceed and what the overall structure is. It helps you determine your options when selecting an excerpt to write and to keep the excerpt in line with the remainder of the work.
Think about the appropriate length for a novel excerpt, which depends on your intended audience. In some cases, an entire chapter may be best. In others, you want to limit it to just a few paragraphs. You don't want to be either too long or too short, and if you know the proper length, you can select a passage which fits the requirements more readily.
Find an area which might make a compelling excerpt. It should entail your main character or characters, and contain elements which embody the novel's central themes and/or an engaging piece of action. You also want to make it as self-contained as possible: something that hints at the larger story but doesn't feel cut-off or incomplete. The selection is as much art as science, so think carefully about which passage works best for you.
Write the excerpt the same way you would write the novel: sit down and get it on the page as expediently as possible. Ideally, you should do it in one writing session, but if you require multiple sessions, then don't get bogged down with revising or changing what you have written until it's complete. Otherwise, you may get so caught up in making it "perfect" that you never finish the task.
Let the excerpt sit for a bit before returning to it. Ideally, it should be a couple of weeks, but try to give it at least a day or so. The time provides some objectivity which you'll need when you begin your revisions.
Revise the excerpt two or three times until you feel satisfied with it. Excise unnecessary passages, rework awkward sections and correct any spelling errors you find. You may wish to let a trusted friend take a look at it as well, provided they can give you constructive criticism that helps you make the excerpt better.
Print the excerpt and send it to your editor, publisher or whatever other entity may require it.