The electoral college was established in Article II of the Constitution, which stipulated that electors in each state would gather to cast their votes; the top vote-getter became President and second place became Vice President. The flaws in this system became apparent rather quickly as elections started going awry since the ballots didn’t stipulate the difference between votes for the presidency and vice-presidency. In 1796, John Adams and Thomas Jefferson ran for president on separate party lines, but since Jefferson got more votes than Adams’ running mate, he became VP. Then, in 1800, Jefferson and Aaron Burr, his running mate, received the same number of electoral votes and the House of Representatives had to break the tie. The losing party decided to try to mess things up by voting for Burr for President, and it wasn’t until the 36th ballot that Jefferson was finally chosen as President. In 1804, the 12th Amendment was ratified to stipulate that electors have to cast separate votes for the president and VP.
The number of electors each state is allocated is based on their total representation in Congress. The minimum number of electors a state can have is three, since every state has two Senators and at least one Representative. The total number of electors at the present time is 538; the US has 100 Senators and 435 Representatives, plus the 23rd Amendment gives three electors to the District of Columbia (their total is based on how many reps they’d have if they were a state, though they cannot have more than the least populous state). After each census, the number of Representatives per state can be changed based on population gains or losses over the previous ten years, and thus their electoral votes change as well. After the 2010 Census, eight states gained at least one representative and ten states lost representatives. The current electoral college vote totals for each state can be seen in the map below.
Most states allocate all of their electoral votes to the candidate who wins a simple majority statewide in the general election. The exceptions are Maine and Nebraska, which give one elector to the winner of the popular vote of each congressional district and only the final two electors are based on the state total. While the winner is typically announced on or soon after election day, the vote isn’t official until the actual electors chosen by each state meet on the Monday after the second Wednesday in December. Typically, there are few surprises and this vote matches the predicted total since the electors are nominated by their political parties and are unlikely to make waves by voting against their state’s choice. So-called “Faithless electors” do pop up occasionally, and frequently the mis-matched votes cast seem to be accidental, such as voting for the VP candidate for president and vice-versa. It can also be an act of protest; in 200o, Washington, DC Elector Barbara Lett-Simmons abstained to protest that the district has no voting members in Congress. However, action by electors have never successfully altered the outcome of an election.
So is it possible to win the presidency and lose the popular vote? Absolutely. In every state but Maine and Nebraska, it doesn’t matter if the winning candidate receives 50.1% of the vote or 90% of the vote; they win the same number of electoral votes. It’s technically possible to reach the 270 electoral votes needed to win with only a tiny fraction of the popular vote, though it would require a completely absurd scenario:
In a two-candidate race, with equal voter turnout in every district and no faithless electors, a candidate could win the electoral college while winning only about 22% of the nationwide popular vote. This would require the candidate in question to win each one of the following states by just one vote: Alabama, Alaska, Arizona, Arkansas, Colorado, Connecticut, Delaware, District of Columbia, Hawaii, Idaho, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, North Dakota, Oklahoma, Oregon, Rhode Island, South Carolina, South Dakota, Tennessee, Utah, Vermont, Virginia, West Virginia, Wisconsin, and Wyoming.
There have only been four elections in which the elected president did not receive a plurality in the popular vote, most recently in 2000. The official tally gave George W. Bush 271 electoral votes to Al Gore’s 266, but Gore received over half a million votes more than Bush, 50,999,897 to 50,456,002.
The electoral college has many detractors. Since most states fairly consistently vote for a particular party in presidential elections, candidates don’t feel the need to focus on them and instead target the swing states with a barrage of ads and campaign promises. Supporters fear that if we changed to a straight popular vote, the focus would instead shift to big cities and more populous areas and that other areas would be ignored. There’s no easy solution, but it would take a constitutional amendment to change it and that is such a laborious process that it seems highly unlikely.