Every two years after our national elections, the new Congress is sworn in on the following January 3rd. So on Jan 3rd, 2021, we will have a new Congress and an old President and VP. If it is also a presidential election year, they meet in joint session on January 6th to count the electoral votes.
For this session, the current VP is in charge. So Pence will stand up at the front on Jan 6th, 2021, flanked probably by Pelosi as speaker of the house, unless the R's take control of the house.
Four "tellers", two from the house and two from the senate, read and submit the electoral vote count from each state. At the end, the VP announces the new president and VP, if a candidate got more than 270 votes. You can have objections in writing if signed by a house member and a senator, which would turn into chaos if we were really fighting down to the last vote.
Pence's role is to oversee this process and announce the new president and vice president. Hopefully someone will win by much more than 270 votes and make this a formality.
If no one gets a majority, it goes to the house to pick the president, but they vote by states so almost certainly Trump would win. There are tons of weird scenarios that could come into play if this happens.
If a president is not picked by Jan 20th, it's possible that the VP elect (if there is one) or the speaker of the house could be named president , depending on what has happened in the house and senate.