An interesting quirk of the United States Electorial system is that the citizens do not directly elect the President of the United State. The United States has something called the Electorial College.
Every four years when the US has a presidential election, in reality, the people are voting for “electors” who will actually vote for the president and vice president. Those votes are then certified and counted by a joint session of congress who will then legitimize the presidential election, on the January 6th after the election.
When the country was founded, it is quite clear that the Founding Fathers did not trust the average American Citizen of the time to vote for higher offices. The only federal office, at the time, citizens could vote for were members of the House of Representatives. Senators were voted on by State Legislators, and the president is and was chosen by electors. The reason there was a time gap between when the electors met and when the new president took office was the time it took for the elector’s votes to reach the capital, in a time where the fastest mode of transportation was horsepower.
There are 538 electors currently. This number is based on the number of House and Senate members combined. And the candidate must win an absolute majority or the election goes to the House of Representatives, and they choose the President. All but two states have a “winner take all” clause with their electors. So whoever wins the majority of the state gets all the votes.
In 1913 the United States passed the 17th Amendment to allow for Senators to be directly elected by the people. But not the election of the President. The country has kept track of the popular vote count since the election of Andrew Jackson (1828) but still doesn’t see the oddity of not having a direct election of the president. There have been 3, possibly 4 elections where the Electorial College, not the will of the people elected the President.
This quirk of the Electoral College makes the presidential election weird in the United States and why “swing states” matter. Because as long as you win 51% of that state you win the whole state, and that can lead to some undemocratic elections.