When you cast your vote for Barack Obama or Mitt Romney, you're not actually picking one man or the other. You're voting for his electors, a group of people (usually selected by the political parties) who, in turn, cast their votes for their candidates. Each state gets one elector for each of its representatives in the House of Representatives, plus two for its Senators.

Because House representation is based on population, so is the Electoral College. With 55 electoral votes, California has the most of any state. The least-populated states, including Wyoming, Alaska and the Dakotas, get three electors each, as does the District of Columbia.

That makes for a total of 538 electors in the Electoral College. Candidates need 270 votes to win the presidency.

In most states, the winner of the popular vote takes all of the Electoral College votes in that state. But Maine and Nebraska allocate their electoral votes proportionally, meaning their electoral votes can be split. [10 Historically Significant Political Protests]

The history of the Electoral College

The result of the electoral system is that sometimes the winner of the popular vote does not end up winning the presidency. It happened in 2000, when Al Gore took the popular vote with 50,999,897 supporters to George W. Bush's 50,456,002. But Bush took the Electoral College with 271 votes (after a tough battle over vote counts in Florida), while Gore had 266.

In 1876, Rutherford B. Hayes lost the popular vote to Samuel J. Tilden, but squeaked by in the Electoral College by one vote to win the presidency. Likewise, Benjamin Harrison had more than 90,000 fewer votes than Grover Cleveland in 1888, but he pulled far ahead in the Electoral College, gaining 233 votes to Cleveland's 168 (fewer Electoral College votes were available then).

In perhaps the most unusual electoral vote incident, John Quincy Adams lost both the popular vote and the electoral vote in 1824, yet still managed to become president. Neither Adams nor his opponent, Andrew Jackson, got a majority of electoral votes — at that time, 131. So the decision went to the House of Representatives, who awarded the race to Adams. Adams quickly made the Speaker of the House, Henry Clay, his Secretary of State, prompting Jackson to accuse the two of a "corrupt bargain."

This year's electoral race

Because of the largely "winner-takes-all" electoral system, candidates focus their energies on states that are likely to go either way — swing states. You won't see many campaign stops in reliably Republican Texas in the last hours of the campaign, for example, but swing state Colorado is fairly crawling with candidates. According to ABC News, Obama and Vice President Joe Biden had planned to spend the last 96 hours pre-election making stump speeches in Ohio, Wisconsin, Iowa, Virginia, New Hampshire, Colorado and Florida. Romney and his running mate Paul Ryan were slated to hit New Hampshire, Iowa, Colorado, Ohio, Pennsylvania, Florida, Virginia, Minnesota, Nevada and Wisconsin.

Most political analysts peg Colorado, Iowa, Wisconsin, Florida, Ohio, Virginia and New Hampshire as this year's swing states. Combined, those states offer 89 toss-up electoral votes available for either candidate.