Two roads diverged in a wood, and I—
I took the one less traveled by,
And that has made all the difference.
Quotes have a way of taking on a life of their own. These lines, the last three lines of Frost's The Road Not Taken, have been endlessly quoted by many people: as epigraphs in their books, on their personal web pages, and so on. And why not? They express an idea that is almost heroic: of doing the unconventional thing, being a maverick rather a conformist, of the virtue of individualism that has always resonated in America, of the satisfaction (or regret!) that your choice ended up making a difference.
To use language is to give expression to ideas; language begins to turn into poetry when the ideas are striking, or the form is striking, or both. Here we have a master poet who has cloaked this idea in creative language, and there are all sorts of subtle things that make the words memorable and charming. (The rhyme, the repetition of the “I”, …) So those who wish to “borrow” the language of a poet to express this idea about themselves are certainly not doing anything “wrong”.
In the context of the poem, though, it appears that the author may have intended (see questions on authorial-intent) something else (or something more), which becomes apparent if we read the poem closely, in its entirety and in order. So let's do that:
Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
In the very first line the author sets the context quickly: here he is, faced with two roads in a wood. Of course, being a single person he can't travel both (what a delightfully absurd idea!), so he's having to make up his mind. This he does:
And looked down one as far as I could
To where it bent in the undergrowth;
Then took the other, as just as fair,
And having perhaps the better claim,
Because it was grassy and wanted wear;
He's considered one road and then decided to take the other one, which (“as just as fair”) is very similar. Why? Simply because it appears “perhaps” better, after looking at its grass and feeling that it needs walking on. Immediately after making this decision on such flimsy grounds though, he is aware that:
Though as for that the passing there
Had worn them really about the same,
And both that morning equally lay
In leaves no step had trodden black.
So, then again (“Though as for that”), the difference is not such a big one, possibly even non-existent. Both roads are good; perhaps the one he didn't take is good too. (You could call this contradiction, but it's just that on closer examination the difference has vanished. And whenever we list pros-and-cons of any choice, taking one side of the matter and then the other, we are, in a sense, contradicting ourselves.) So there is already a fear of having picked the wrong one, which is assuaged with:
Oh, I kept the first for another day!
Yet knowing how way leads on to way,
I doubted if I should ever come back.
“The next time I'm here, I'll take the other one” is what he tells himself, knowing fully well that there may not be a next time. What's more likely to happen is something else (I've added the quotation marks for clarity):
I shall be telling this with a sigh
Somewhere ages and ages hence:
“Two roads diverged in a wood, and I—
I took the one less traveled by,
And that has made all the difference.”
Remember the original reason he picked the second road, because it was “perhaps” better, as it was “grassy and wanted wear”? The reason which, on closer examination, turned out to be flimsy as the difference was negligible? No matter; he's going to stick to that story. Years later, at parties and to grandchildren, he's going to make the difference seem larger than it was. Exaggerate it, put on an act (“telling this with a sigh”), claim that his decision has always been to take the less-travelled road, and that this has made a difference.
So those who take the last three lines and think that they represent Frost's intention can be said to have “misunderstod” the poem. (See similar comments by David Orr, in video and in text — he's written an entire book called The Road Not Taken: Finding America in the Poem Everyone Loves and Almost Everyone Gets Wrong and the excerpt linked is good reading.) It is also telling that many people misremember the poem's title as The Road Less Traveled: Frost may have intended the title The Road Not Taken to be about the road he did not take, but many people who are strongly affected by the last lines seem to have interpreted the poem as being about the road not taken by (many) others: the less-travelled road he did take.
However, (as I said at the beginning of this answer), they are perfectly valid in their understanding of those three lines specifically, which are indeed intended to convey the idea they have. (That's why he's going to say it “ages and ages hence”: because it is really an awesome thing to say!) The poet is fooling around and mocking the utterance of that idea, sure, as is clear from reading the entire poem and as convincingly demonstrated by the historical research in Rand al-Thor's answer, but the poet is also on to something more here.
The metaphorical application of the poem to a scope beyond forest-navigation is obvious, as the experience is universal: we have all been faced with questions like “which subjects should I study?” “Should I stay at my current job or take the new one?”. And we have responded with reasoning like “I will study [X] because it will fulfill my soul” or “I will stay at my current job because career prospects are better”. But people change, the world changes, and this reasoning may turn out to be rubbish. We are left rationalizing the choices we did make, or overstating their significance.
This is life. We are faced with choices; we hesitate and waver; we consider one option and then the other; we pick somewhat randomly for reasons that seem good at the time; we know these reasons don't always hold water; we may tell ourselves we can still try the other one and only sometimes admit to ourselves that the decision may be irrevocable; we later muse/wonder about having taken the other choice (The Road Not Taken); we make peace by telling grand stories about how our choice was the right one (or sorrow by telling how our choice was the bad one). So the last lines may be an act, but the propensity to put on such an act is very real.
Possibly without intending it, Frost has created a masterpiece that succinctly captures all of this in 20 memorable lines (with rhyme and metre), with the images of a “yellow wood” to boot.
Having understood all this about human nature though, one arrives at a maturity that goes back to the point Frost was trying to make to his friend Edward Thomas (again, see Rand al-Thor's answer): no matter which choice we make, we'll go through the same sequence of emotions anyway. It's just two roads in a wood; the choice doesn't matter. Quit agonizing so much, pick one and keep moving.
A couple of comments based on other Frost poems:
This is not the only Frost quote that is loved by people even though the context of the poem is against it. Many people attribute “Good fences make good neighbors” to Frost or his poem Mending Wall, even though in the poem the narrator is speaking against someone who utters that proverb mindlessly. (Here too, the distinction between someone who says something and means it, and the poet thinking about the act of saying it.)
In a sense, Frost's Fire And Ice is also a similar consideration-reconsideration, which you could call “contradicting himself”: picking one option and then saying the other will do too.