The Electors shall meet in their respective states, and vote by ballot for President and Vice-President, one of whom, at least, shall not be an inhabitant of the same state with themselves; they shall name in their ballots the person voted for as President, and in distinct ballots the person voted for as Vice-President, and they shall make distinct lists of all persons voted for as President, and all persons voted for as Vice-President and of the number of votes for each, which lists they shall sign and certify, and transmit sealed to the seat of the government of the United States, directed to the President of the Senate.
The President of the Senate shall, in the presence of the Senate and House of Representatives, open all the certificates and the votes shall then be counted.
The person having the greatest Number of votes for President, shall be the President, if such number be a majority of the whole number of Electors appointed; and if no person have such majority, then from the persons having the highest numbers not exceeding three on the list of those voted for as President, the House of Representatives shall choose immediately, by ballot, the President. But in choosing the President, the votes shall be taken by states, the representation from each state having one vote; a quorum for this purpose shall consist of a member or members from two-thirds of the states, and a majority of all the states shall be necessary to a choice. And if the House of Representatives shall not choose a President whenever the right of choice shall devolve upon them, before the fourth day of March next following, then the Vice-President shall act as President, as in the case of the death or other constitutional disability of the President.
The person having the greatest number of votes as Vice-President, shall be the Vice-President, if such number be a majority of the whole number of Electors appointed, and if no person have a majority, then from the two highest numbers on the list, the Senate shall choose the Vice-President; a quorum for the purpose shall consist of two-thirds of the whole number of Senators, and a majority of the whole number shall be necessary to a choice. But no person constitutionally ineligible to the office of President shall be eligible to that of Vice-President of the United States.
This without a doubt is the longest of the amendments to the constitution and basically is desired to correct problems with presidential election process that surfaced in the 1796 and 1800 elections. For better or worse this amendment created the system we know to day as the electoral college for president. It is long for an amendment but the idea was that each state could have a number of electors equal to the number of senators and representatives combined. The idea being that all states would have at least three and the larger states as far as population would have more. Part of the issue is making sure the smaller states still had a voice in choosing the President with at least three votes.
Historically speaking this has lead to sometimes the popular vote being for a guy but the electoral college being in the favor of the other candidate. Most recently this happened in the Bush-Gore election of 2000. The popular vote was for Gore but the electoral college was in favor of Bush. There however have been other elections that had this happen. Some of the earliest elections actually had much debate as to who the electoral college would choose.
Opponents of this system state that now with modern voting techniques this is an anachronism that needs to be removed but I have to disagree. If the vote were purely popular, then smaller population states would have no relevance at all in the choosing of the president as a few states would absolutely dominate the election every time. With the electoral college the smaller states actually can have some impact on the process. States like Wyoming and Rhode Island would have little say without this process.
What is nice is that this shows that if a flaw was found in the Constitution Process the Founders were not afraid to change it as it was ratified in December of 1803 just in time for the 1804 election. Thomas Jefferson won that one which gave him his second term.