To "win" NaNoWriMo, you have to reach your word-count goal by 11:59 PM on the last day of the challenge, either by manually entering your total word count where it says "Update Total Word Count" in your novel box, or by typing enough words into the writing space (depending on which preference you set).
For official event challenges, when you win, you'll be taken to your winner page, where you can watch the winner video and download some swag.