When Americans cast their ballots for the US president, they are actually voting for a representative of that candidate’s party known as an elector. There are 538 electors who then vote for the president on behalf of the people in their state.
Each state is assigned a certain number of these electoral votes, based on the number of congressional districts they have, plus two additional votes representing the state’s Senate seats. Washington DC is also assigned three electoral votes, despite having no voting representation in Congress. A majority of 270 of these votes is needed to win the presidency.
The process of nominating electors varies by state and by party, but is generally done one of two ways. Ahead of the election, political parties either choose electors at their national conventions, or they are voted for by the party’s central committee.
The electoral college nearly always operates with a winner-takes-all system, in which the candidate with the highest number of votes in a state claims all of that state’s electoral votes. For example, in 2016, Trump beat Clinton in Florida by a margin of just 2.2%, but that meant he claimed all 29 of Florida’s crucial electoral votes.
Such small margins in a handful of key swing states meant that, regardless of Clinton’s national vote lead, Trump was able to clinch victory in several swing states and therefore win more electoral college votes.