The American Electoral College system is a point of confusion not only among foreigners trying to understand the process, but also among Americans who just want to cast a vote for president. Everyone's seen the red and blue maps with the numbers, but there are people called electors behind those numbers. How electors pledge their votes is what decides who becomes president every four years, so it's well worth understanding the system.
To start with, each state gets the same number of electors that they have representatives in Congress, so two for the two senators and then the rest account for their members in the House of Representatives. North Carolina, for example, has 15 electors in the Electoral College, because they have two senators and 13 congressmen. The smallest states by population plus the District of Columbia all have three electors.
These electors, however, actually don't have as much power as their name might suggest. Electors are selected through state parties to function as the people who will select the president, if their party's candidate wins the popular vote in the statewide election. When they are selected, the electors pledge to vote for their party's candidate for president in the event that that candidate gets the most votes in the state.
For 48 out of 50 states, all of the state's electoral votes go to the candidate who won the popular vote. Thus, using North Carolina as an example again, if Donald Trump were to win the popular vote in the state even by a margin of 51 percent to 49 percent, he would get all 15 of North Carolina's electoral votes. In that case, technically the state's Republican electors would have gotten more votes than the Democratic electors, so the electoral votes would go to the Republican candidate. Only Nebraska and Maine have different systems; those states both assign one elector to each congressional district to be decided by the popular votes in those districts, and the two remaining electors are tied to the statewide popular vote.
A common misconception about the Electoral College is that it means that individual people's votes don't count, because only these electors vote. Your vote, however, actually counts more in this system than it would in an national popular vote, because you're throwing it into a smaller pool — just your statewide election, which decides the electors and thus decides where your state's electoral votes go.
Electors do very occasionally vote for someone whom they are not pledged to, although many states now have laws against that practice. Even so, though, none of these so-called "faithless electors" have ever been prosecuted for their decision to renounce party loyalty. Given that the system is broken up by state, it is also possible for a candidate to win the electoral vote and lose the popular vote or vice versa, although this has only happened four times. The country saw it most recently in 2000, when Al Gore had more votes in the country overall but fewer in Florida, and that state's electoral votes handed the election to George W. Bush.
Love it or hate it, the Electoral College system is what the United States has been using for the last couple of centuries to determine elect the presidents. This year, it will decide whether Donald Trump or Hillary Clinton will take office come January.