Under the original procedure for the Electoral College, each elector could vote for TWO persons. This enabled each voter to vote for their favorite candidate as well as cast a vote for whom they thought could actually win. The person receiving the greatest number of votes, provided that number equaled a majority of the electors, was elected President. The one who received the second greatest number of votes was elected Vice President.
If there were more than one individual who received the same number of votes, and such number equaled a majority of the electors, the House of Representatives would choose one of them to be President. If no individual had a majority, then the House of Representatives would choose from the five individuals with the greatest number of electoral votes. In either case, a majority of state delegations in the House was necessary for a candidate to be chosen to be President.
Problems started with the 1796 election. In that election, John Adams, the Federalist Party presidential candidate, received a majority of the electoral votes. However, the Federalist electors scattered their second votes, resulting in the Democratic-Republican Party presidential candidate, Thomas Jefferson, receiving the second highest number of electoral votes and thus being elected Vice President. Since they were from two different parties, they quickly found that this was a flaw in the Constitution. It's hard to work together if you don't share the same ideas and values.
The 1800 election exposed an additional defect in the original formula in that if each member of the Electoral College followed party tickets, there could be a tie between the two candidates from the most popular ticket.
In 1800, Republican Jefferson and Republican Burr ran against Fedralist Adams and Federalist Pinckney. Jefferson and Burr both won the majority of votes, but since each elector cast two votes, the election was a tie (73 to 73). To break the tie, each House would cast a single vote. The Repulbican--controlled states favored Jefferson over Burr (there were 8). Six states were considereed Federalists and they favored Burr (he was formerly a Federalist and his ideas swung back and forth). That left two swing states to decide the race since the majority would consist of 9/16 votes. If both swing states went to Burr it would be another tie. One of them had to swing to Jefferson. Congress voted twice and in both votes, Maryland and Vermont abstained from voting--they just couldn't make up their minds. On the third vote, Delaware also abstained--they didn't want to vote for Jefferson, but they also wanted the election to end and felt that Jefferson would work with the Federalists after all (rumors of back door conferences between Delaware and Jefferson might have had some effect on this). With the vote now at 13 out of 16 states casting a ballot, Jefferson won his majority of 8 for Jefferson and 5 for Burr with 3 states abstaining from the vote.