It isn't impossible for a third-party or independent candidate to win a Presidential election. However, it is very unlikely for several reasons.
First, a candidate needs lots of media attention in order to win. If the major news media organizations (Fox News, CNN, CNBC, NBC News, etc.) don't mention a candidate frequently, most voters won't know he exists. As a result, he will not be able to gain even a fraction of the votes needed to win.
So how does a candidate win media attention? By running advertising. When a candidate runs television, Facebook, Twitter, and YouTube advertisements, voters hear about the candidate and wonder who he is. As a result, they expect media organizations to discuss his candidacy.
Because of this, the media will discuss him or her. They may discuss the candidate negatively or positively. But it makes little difference. As long as the media talks about the candidate, he or she will be considered "serious" and will get more votes.
This leads to the second problem: money. A candidate needs millions of dollars to run the advertising needed to be considered "viable" and to get media coverage. If a candidate is a third-party candidate or independent, most big businesses and PACS will consider her to be "unviable" right off the bat. As a result, they will not contribute to her and she will not have money to run ads. Because of this, the media will not report on her. This lack of media reporting will be seen by donors as confirming that she is "unviable" and therefore should not be contributed to.
This will result in a vicious cycle that prevents her candidacy from ever gaining traction.
You might assume that a candidate could get around this by possibly having one big donor with lots of money. However, campaign finance laws prevent this from happening because donations from a single donor are capped. This ensures that only major party candidates with lots of business connections can run successfully.
This leaves only one possible avenue for an independent candidate: be rich. If a candidate is personally wealthy, he can get around the single donor limits. This is because the U.S. Supreme Court has ruled that a limit on personal contributions to one's own candidacy is a violation of freedom of speech.
However, a third party candidate who uses his own wealth to run will encounter extreme opposition from the established businesses and political institutions. Donors of both political parties will spend tens of millions of dollars on ads claiming that the independent will cause the other party's candidate to win. So Democrats will engage in an all-out propaganda campaign to tell voters that a vote for this independent candidate will result in the Republican winning. Meanwhile, Republicans will engage in an all-out propaganda campaign to tell voters that a vote for this independent candidate will result in the Democrat winning.
As a result, most of the media coverage will revolve around the question of whether a vote for the independent candidate is a "wasted vote," and the candidate will be unlikely to win.
Its important to remember that the U.S. does not have run-off elections like France. So if no candidate wins a majority in a particular state, there is not a second round of voting to determine who the voters wanted to win. Instead, 100% of the electoral votes go to whichever candidate has a plurality.
For example, if the vote count in Ohio is 40% for the Democrat, 41% for the Republican, and 19% for the Independent, the Republican gets 100% of the electoral vote from Ohio. This is true even though 59% of the voters in Ohio did not prefer the Republican when polled.
Extrapolate this result to the entire country and you can easily end up with a President winning who has 41% of the national vote (or less). For this reason, voters are understandably fearful of voting for a candidate if the media says that he or she will definitely lose. They don't want the President to be elected by a statistical accident.
Still, an independent candidate can win if he 1. is independently wealthy and 2. can convince voters either that the Democrat absolutely can't win or that the Republican absolutely can't win.
This is pretty tough to accomplish though because, unlike the independent, the Republican and Democratic candidates have been subjected to a grueling open primary season in which they have proven that they can win over and over again across many different states.
For this reason, a Presidential win by an independent or third-party candidate is unlikely, although still not impossible.