The election process may seem complicated, but it is actually very simple. Each state holds their own voting. Once the votes have been tabulated, the popular votes, the winner of the state is awarded the Electoral College votes for that state. The Electoral College votes are then tabulated and the winner must have a total of 270 (of the 538).
Electoral votes are based upon a state's total population. States with larger populations are awarded more Electoral votes than states with smaller populations.
In order to explain how the Electoral votes work, we will take a look at two different state's populations and Electoral votes. Illinois has a population of 12,830,632 (resulting in 20 Electoral votes) and Missouri has a population of 5,988,927 (resulting in 10 Electoral votes).
If Presidential Candidate X receives all of the votes in Missouri, he or she will receive 10 Electoral votes. If Presidential Candidate Y receives all of the votes in Illinois, he or she will receive 20 Electoral votes. At this point, Y would be wining the election.(A candidate does not need to take all the votes in a state to win the Electoral votes, they simply must have the majority.)
Sometimes, even if a candidate wins the popular vote, the Electoral votes do not add up in their favor.
If a tie is found to have happened (each candidate receives 269 Electoral votes) the decision (for the new President) is given to the House of Representatives. Each member of the House is given one vote and the winner is decided in this way. The Senate elects the Vice-President.