The American Presidential election is actually 51 separate election contests in the 50 States and the District of Columbia (Washington DC). The winner is not decided by a national tally of votes, but is chosen by an Electoral College composed of State representatives.
Each State is allocated a number of electors equal to the combined total of its representation in the House of Representatives and Senate. For example, California has 52 members in the House, plus 2 Senators, so receives 54 Electoral College votes.