Presidents are elected not by national popular vote but by an 18th century constitutional compromise called the Electoral College.
HOW IT FORMED
When framers were drafting the U.S. Constitution, there were two competing ideas on how to elect the president. One group said Congress should do it; the other said it should be a national vote of eligible citizens. There also were disputes over how much slaves should count in representation in Congress and over how power would be distributed between small and large states. The compromise became part of the second article of the Constitution, although the words "Electoral College" are not included. The electors pick the president and vice president.
Each state gets one electoral vote for each of its representatives in the House and Senate. The District of Columbia gets three votes. All told, there are 538 votes in the Electoral College. A candidate must have at least 270 to win. Except for Maine and Nebraska, states award all their electoral votes to the candidate who wins the state. In Maine and Nebraska, votes are apportioned by congressional districts. So in 2008, even though John McCain won Nebraska's statewide popular vote, Barack Obama won the 2nd Congressional District and earned one of the state's five electoral votes.
HOW IT WORKS
Each state's electors will meet on Dec. 17 in their home states and cast their votes for president and vice president. Congress will meet on Jan. 6, 2013, to conduct an official tally of the electoral votes. Vice President Joe Biden will preside and declare the winner.
If no candidate gets at least 270 electoral votes, the election goes to the newly elected House of Representatives. Each state delegation in the House gets one vote, and a candidate must win a majority of the states to be elected president. This happened in 1824, when Andrew Jackson won the most popular votes and the most electoral votes, but four candidates split the electoral votes and no one received a majority. The race went to the House and John Quincy Adams, who came in second, was chosen as president. Three other times, candidates won the Electoral College even though they lost the popular vote — in 1876, 1888 and 2000.