Well, 1796 hadn't gone so well, what with Jefferson running for president and getting the vice presidency as a consolation prize.Trying to get just one person to vote for him and someone who wasn't his running mate, so Jefferson would get the most votes and Burr would be just behind, was a really neat trick, and beyond the abilities of people who didn't have phones. Adams and Jefferson supporters both tried it in 1796, and both groups had a lot more people than they could afford voting for Adams and not-Pinckney or Jefferson and not-Burr. Would they come up with a better plan in 1800? Short answer: no. Long answer: they overcorrected, and it actually kinda turned out worse.
The setup was almost exactly the same: President John Adams ran for reelection, and his running mate was Charles C. Pinckney, the brother of 1796 Federalist nominee Thomas Pinckney, who was elected to the House after his loss. Vice President Thomas Jefferson ran against him, the first and only time that would happen*. Campaigning between the two was bitter, fierce, and frankly kind of mean-spirited, so pretty much like it is nowadays. Well, I say between the two, but neither Adams nor Jefferson really took part in the race, since that was the Done Thing back then; having your colleague accuse your opponent of wanting to bring the king back, or teach "murder robbery" in school, was just fine, but doing it yourself was just gauche.
There wasn't a lot of actual voting by default at this point, since several states already had the legislature involved in the elector process or control it entirely, and a few more changed to benefit the party that controlled the legislature. When election day rolled around, there were only a handful of states where the people got a remotely direct say in the election of the president: KY, TN, RI, VA, MD, NC. Of those states, Rhode Island was the only one to cast no votes for Jefferson, though NC was split 8-4 for him.
Those are the records we have for the popular vote, so on paper 1800 seems like a massively one-sided election: Jefferson with 41k and 61%, Adams with 36k and 39%. Since almost all the Federalist states had the legislature choose the electors, it seems like Adams was massively unpopular. If that had been the vote with everyone going to the polls, Adams would likely have gotten the 16 votes from Massachusetts and little else. He actually came very close to beating Jefferson, 65 electoral votes to 73.
So Jefferson got 73 votes, and Adams got 65. Therefore, for each party the goal was, respectively, for Burr to get 72 votes, and Pinckney to get 64. That's exactly what Pinckney actually got, and it's kind of a shame that they couldn't win five more votes and have that scheme work. Burr, however, also got 73, and so the vote was a tie and the election went to the House. The House that would be doing the voting, however, was the one elected in 1798, which had an overall Federalist majority, and more importantly eight out of sixteen state delegations with a majority of Federalists -- enough to deny a majority of the vote.
The Federalists had already lost: Jefferson and Burr got more electoral votes than Adams and Pinckney, and they had to choose between Jefferson and Burr for the Presidency. Thing is, most of the Federalists hated Jefferson, and they weren't just going to acquiesce to his election. So six of the eight states with Federalist majorities voted for Burr, just to stick it to Jefferson, while all seven Republican states voted for Jefferson. Georgia's sole representative, a Federalist, also voted for Jefferson, while one of Maryland's five joined the three Republicans in voting for him, and Vermont had one of each, so Maryland and Vermont didn't cast votes.
Eight votes for Jefferson, six votes for Burr, and two not voting. That's where it stood for 35 ballots, from February 11 to 17, while leading Federalist Alexander Hamilton started writing letters urging his fellows to vote for Jefferson. While they were both scum, in Hamilton's view, Jefferson at least had principles, wrong though they were; Burr was an unmitigated opportunist, and would be a worse president. So on the 36th ballot, Federalist James F. Bayard of Delaware left his ballot blank, as did two of his colleagues from Maryland and Vermont, changing the latter states from tied to favoring Jefferson, giving him two votes and the majority he needed. Federalists in South Carolina also cast blank ballots rather than voting for Burr, but that didn't make so much of a difference.
It was settled. Thomas Jefferson was elected president, and Aaron Burr vice president. And on March 3, Adams left the White House, and his greatest rival was sworn in as his successor. That was one of the greatest acts of American democracy at the time, and remains to this day. Adams lost, and rather than wage some fractious and destructive campaign to retain power, he relinquished his office. For that, he deserves far more credit than an aged and weary Washington leaving after the second term he didn't even want in the first place.
*In theory, it could happen again, though it would require a third-party ticket that actually got some votes, so neither major party managed a majority. With no electoral college majority, the presidential election goes to the House, and the vice-presidential election goes to the Senate. If one party has majorities in more than half the state delegations, but the other has a majority of the Senate seats (which is currently the case), then the president would be of one major party and the vice president of the other.