The first one is the easiest (and least controversial) of the two so we'll start with it. In sort, political polling is not nearly as accurate as everyone thinks, and both President Obama and President Trump's elections are great examples of that. I'll try to reference both in this explanation but I'll probably reference Trump more since I've actually actively studied his campaign. So, when a party is performing polls, they tend to use one of three different methods: Door to door, survey calls, and online polls. Each has their major downfalls that lead to polling numbers being rather inaccurate.
Door to door has the most potential for inaccuracies, since you can't poll people if they don't answer the door or send you away without answers. Same is somewhat true with phone calls, as if they don't answer then you can't survey them. But in addition, the selection process in itself skews things. See, your party affiliation is public record, so if you're affiliated with say, the Democrats, political strategists will be able to figure that out quite easily. And even if you're not required to align with a certain party like in my state, they can also see which elections you voted in, which means if you voted in the Republican primary, they'd know. So say I'm a political strategist for the Republican candidate Bob Smith, well then I'd want to survey people that have voted Republican in the past to see what issues are most important to them so I can formulate Mr. Smith's platform to best suit his potential future constituents. Specifically, I would select people who had voted in three of the last five elections, including midterms and primaries, because this means they're active voters. No need to poll Mrs. Dorian down the street if she hasn't voted in twenty years. Or at least, that's the thought process. This system is used for both Door to Door and Survey calls.
Here's the problem with this system though. In both Obama and Trump's elections, their victories were attributed, at least statistically, to a group of unsurveyed voters that caused polling to be inaccurate. In President Obama's case, it was African Americans who went largely unaccounted for. In President Trump's case, it was older Caucasians who hadn't voted for nearly 30 years. And while I can't really speak first hand about President Obama's voter base, in the lead up to the 2016 election I actually worked at the county elections office where people had to come to get registered to vote and I recall so many of them boasting about how they had not voted since Reagan so they needed to get their registrations renewed. These people are obviously NOT active voters and thus went unsurveyed by both parties.
Phone calls also have additional problems beyond people not answering you. Though the not answering is becoming more and more common thanks to caller ID. Having done cold calls myself, I also have figured out that people don't really like being called by political surveyors and tend to curse you out or hang up. Don't be too shocked about it though as your phone number is also public record once you register to vote, so if you get selected they will call. Another problem that's really only something that has been discussed in theory but is largely suspected to be another reason why 2016's numbers were so skewed is people lying on phone polls. While there's not a ton of concrete evidence for this (the nature of political science at its core), there are a lot of theories that because political surveyors call you on the phone and know who you are, people are more inclined to lie about a candidate if they think they're the more controversial choice, like with President Trump. This can make the few responses cold calls get unreliable as there is no way for us to know if you're lying.
Finally, online polls are probably the polls with the most accurate numbers, but they also have very distinct problems. For one thing, they're opt in. Obviously, in theory, all three methods require you to agree to take the survey, but the difference with online surveys is people have to take the initiative to take the surveys. You have to follow whatever link it is to answer the surveys. As a result, while they have more interactivity, you actually tend to see more extreme answers to questions since it's mostly the really passionate people who take the surveys, and they don't represent the majority of populations. And another problem is that depending on who is sending the survey out, the answers may be specifically worded in a way to purposely lead to skewed answers because they'll say stuff like "the lying liberals" or "the criminal immigrants", which discourages moderates or less extreme voters from actually answering.
All in all, while polls are great to use for reference stuff, they're growing largely more and more inaccurate. So when you're checking polling numbers, the best advice I can give there is to check what site you're getting your information from and then keep in mind that it may be a little or a lot off. Especially when we get down to only two candidates, you're not going to want to go to any news source with a large bias, since their numbers will definitely be skewed. Aim for a more moderate site, those with slight skews are okay but again just keep in mind their numbers might be a little off. Best way to check a site's leaning as well is to use the site
Media Bias Fact Check.