Quick Answer: Random sampling allows statisticians to understand a massive population by testing a tiny fraction. If the sample is truly random, interviewing just 1,067 people can accurately predict the opinions of the entire US population (330 million) with a 3% margin of error.
The Soup Taste Test
It seems impossible that 1,000 people represent a country. George Gallup famously explained it like soup: If you make a massive pot of soup, you don't need to drink the whole pot to know if it needs salt. You just need to stir it well (randomize) and take one spoonful (sample). A perfect sample is perfectly representative.
The Enemy: Selection Bias
If you fail to "stir the soup," your poll is doomed. In 1936, the Literary Digest polled 2.4 million people and predicted Landon would beat Roosevelt. They were completely wrong. Why? They pulled names from car registrations and telephone books. In 1936, only wealthy people owned cars and phones. They sampled a massive, but highly biased, portion of the soup. Gallup polled only 50k people randomly and got it right.
Margin of Error
No sample is perfect. The Margin of Error (MoE) is the mathematical buffer. If a poll says a candidate has 50% support with a 3% MoE, it means statisticians are 95% confident the true reality is somewhere between 47% and 53%. Whenever two candidates are within the margin of error, the poll is a statistical tie.