What is the Electoral College and how does it work?
The Electoral College is the mechanism the Constitution establishes for choosing the President and Vice President, set out originally in Article II, Section 1 and substantially revised by the Twelfth Amendment (ratified 1804). Article II, Section 1, Clause 2 gives each state a number of electors equal to its total representation in Congress - its House members plus its two senators - and lets each state legislature decide how those electors are chosen, which today means every state selects electors based on its popular vote. The original system, before the Twelfth Amendment, had each elector cast two votes for President with no separate vote for Vice President; the runner-up became Vice President. This produced an unworkable result in the election of 1796, when President John Adams and his rival Thomas Jefferson ended up serving together despite being from opposing parties, and a genuine constitutional crisis in 1800, when Thomas Jefferson and Aaron Burr tied in electoral votes for President, throwing the election into the House of Representatives for 36 rounds of voting. The Twelfth Amendment fixed this by requiring electors to cast distinct, separate ballots for President and Vice President rather than one combined vote. Under the current system, electors meet in their own states in December after the general election and cast their votes; if no candidate wins a majority of electoral votes for President, the House of Representatives chooses the President from the top three candidates, with each state delegation casting a single vote - a procedure used only twice in American history, in 1800 and 1824. The Electoral College means presidential elections are decided by winning combinations of individual state contests rather than by the national popular vote total alone, a structural feature that has produced a handful of elections where the electoral and popular vote winners diverged.
Source: U.S. Constitution, Article II, Section 1; Twelfth Amendment