The main issue was that there was a disconnect between the media and what the polls said. Overall the polls predicted a close race within their margins of error. As it happened several key states flipped within that margin of error between poll numbers and actual results.
Usually that margin of error is stipulated at 3% by most (decent) polls.
The media essentially did away with that inherent uncertainty and claimed the polls were wrong.
However with accounting the uncertainty of 3% polls declare themselves in, only Wisconsin was actually wrong aka beyond a 3% jump, I believe.
So Trump was not winning in the polls, but the polls did measure a race within their margins of errors aka too close to call with any certainty and ultimately only missed their mark in one state.
Contributing factors in 2016 not present in 2020:
- significant third party candidates sapping Democratic votes
- a higher percentage of undecided voters going into the last two weeks
- the Comey press conference reopening the entire E-Mail affair for the nth time in the news cycle which in itself could have swung voters on the basis of "if there is so much smoke so close to an election..."
- a polling bias where most pollsters did not get enough data from certain demographics (mostly non college white men) that then swung the vote
But because of 2016 the pollsters stress far more at every opportunity how propabilities work and they obviously do not replace the actual election.
However in 2020 factors contributing to uncertainty:
- Mail ballots and early voting on unprecedented levels
- Election law uncertainty in various states if votes will be counted
- Calls for voter suppression/intimidation (which is illegal so don't try it)
- Calls for double voting (which is illegal so don't try it)
- Preemptively declaring the election invalid on the basis of voter fraud that has not happened, yet, and there is no basis of it having happened in any election before...
Yeah, I am biased on the last few, sue me. The last four points can manifest and might mean the vote is irrelevant because it will be ultimately the courts that decide.