Recent polls show President Trump and former Vice President Joe Biden in a virtual tie in national polls. State polls show the race as a tossup. Come November, the country may find itself in a situation where neither candidate has sufficient electors (270) to win.
This is where Congress comes in. The 12th Amendment requires it to settle contingent elections. The process requires members of the House of Representatives to vote for the president; and the Senate votes for the vice president. Since the passage of the 12th Amendment, Congress has decided two elections: In 1825, the House chose John Quincy Adams over Andrew Jackson, who had won a plurality of the popular vote and 99 electors to Adams’ 85. In 1877, Congress intervened after a dispute over ballots in a handful southern states, forming the Federal Election Commission and ultimately granting victory to Rutherford B. Hayes over Samuel Tilden.
In the House, each state in the union gets one vote. Which means, for example, that Pennsylvania’s 18 representatives (nine Democrats and nine Republicans) would need to come together to choose either Biden or Trump (assuming nobody else is in the running). Whichever presidential candidate gets 26 votes becomes president.
In the Senate, matters are a little less complicated. Each senator gets one vote. The candidate who gets 51 becomes vice president.