It is astonishing to me that, while all of these tidbits of advice are good, none of the noders have mentioned some other, obvious methods of defense in a knife fight. If you are wearing a jacket or button-down shirt (unbuttoned, of course) then it is wise to take it off as quickly as possible, wrap it around the arm which is not dominant and use it as a shield. Bundled clothing wrapped around one's arm is very difficult to cut through with a single slash unless the blade of the attacking knife is razor-sharp (statistically speaking, this is unlikely unless you are in a professional or military combat situation- most thugs rarely think far enough ahead to sharpen their knives or take the time to do it).
If a knife lunge is made in your direction, use your wrapped arm to take the brunt of the attack either in a hard block or a sweeping block. Then quickly use your free hand to grab the wrist of the assailant's knife-hand very firmly and twist in the most uncomfortable direction you can imagine your own wrist being wrenched. Next, yank on that wrist really, really, really hard and bring your knee up into the assailant's solar-plexus, groin, face or neck. Quickly swing the arm of the knife-hand (while still gripping the wrist) across your body so that the assailant is put off balance and turned away from you and yank the arm again so that it is bent behind the assailant's back. Push. Hard. Let gravity help you shove the person directly into the ground and use your knees to pin the assailant's chest or face to the ground. The small of the back is a great place to put your knee.
By that point the knife should have been either dropped or the grip on it relaxed. If you feel so inclined, you may use your wrapped arm to beat the assailant about the base of the skull until unconsciousness ensues or "uncle" is cried. Then make a citizen's arrest.
This whole scenario is, of course, presupposing the notion that you have some sort of apparel which can be used to wrap around your arm. If you are not clothed as such, then take everyone else's advice and run like hell at the first available opportunity.
I once read an excerpt from a book that pertains somewhat to this topic. The scene is two people who are walking down a street, a man of hardened battle experience offering some wisdom to a younger man on the topic of swords and weapons. I cannot, for the life of me, remember the actual quotes/conversation, but I shall paraphrase:
"That sword on that man's hip over there. You see it?"
"What is it meant for?"
"Wrong. That is not meant for killing. It is meant for show, as a deterrant. A weapon which is meant for killing will not be seen until it's too late. There are two types of weapons: ones meant for killing and those meant for intimidation. An experienced assassin will conceal his weapons. An idiot will show you what he has before you even exchange two words, let alone fight."
"Does it matter, as long as he is proficient with it?"
"What kind of idiocy is that? Look at that thing! It's a work of fine craftsmanship and art. Would you be eager to sully it with blood? No. A real weapon will look the part. That thing on his hip is a toy and while he might know enough tricks to wound himself with that thing, he probably couldn't bring himself to ruin it with bloodstains or nicks or risk it getting broken. It's too valuable to be used as a weapon. I'd be less afraid of that ornate sword than I would be of the dagger in his boot, which does look particularly nasty- and stained, I might add."
All of this to say: even though a person is weilding a knife and is pointing it in your general direction, that doesn't necessarily mean the supposed assailant knows what he is doing or how to use it properly/effectively. Time is crucial- you won't have a whole lot of it to pick and choose your immediate reactions. And, granted, you may not have enough time to use any clothing as a shield or to find a weapon of your own to use in your defense. But one of the first things you should pay attention to is how certain your opponent is of him/herself. I can tell you this much:
A smart killer won't let you see that blade until it's buried in your back. That you see it at all, even from ten paces away, speaks more to your advantage than you might think. And if you keep your head screwed on tight, you might walk/run away from the scene alive and relatively unharmed. Bear it in mind.