Let's take an example. Let's say you are undecided between Hillary and Jill Stein, but you despise Trump. It's a close call, but you decide to cast your vote for Stein.
In Michigan, Trump beat Hillary by 279000 votes to 268000 votes, a margin of 11,000 votes. Jill Stein got only 50,000 votes, so she never stood a chance of winning Michigan, but arguably caused Clinton to lose the state.
So if you lived in Michigan, by voting for a candidate with zero chance of winning, you wind up with the candidate you despise rather than a candidate that actually had a chance of winning that you would have liked better.
That demonstrates the folly of voting for third party candidates. Vote for the candidate you like best who actually has a chance of winning, or the candidate you dislike least. Otherwise, you might end up with the candidate who was your LAST choice winning the election.