As laid out originally in the Constitution, the election process was meant to be a contest of individuals not political parties. With an individual like George Washington, whose popularity cut across all groups, this system worked well enough. But during the two elections that followed, the rise of political factions produced some unexpected outcomes. As a result, the 12th Amendment, which changed the way the vice president is elected, was ratified in 1804.
Today when an elector casts his ballot he lists one person as his choice for president and another as his choice for vice president. Then two separate lists are drawn up; one with all the names and votes cast for president, and another with all the names and votes cast for vice president. The person with a majority of votes on the presidential list is named president and the person with a majority of votes on the vice presidential list is named vice president. If no one receives a majority of the votes for president, then the House of Representatives chooses from the top three candidates. If no one receives a majority of the votes for vice president, then the Senate chooses from the top two candidates.
Before 1804, however, when an elector cast his ballot he listed his top two choices for president. The choices weren't ranked as "first choice" or "second choice" and no mention of vice president was made on the ballot. One list was then drawn up that included both names from every elector's ballot. The person with the majority of votes from the total numbers of electors (not the majority of the total number of electoral votes) was named president. The person with the next highest number of votes was named vice president. If two people had a majority and the same number of votes, then the House of Representatives would choose between them which would be president; the other would be vice president. If no one received a majority then the House would choose the president from the top five candidates. From the remaining four, the one with the most electoral votes would be vice president. If two or more people were tied for second on the list the Senate would choose among them the vice president.