Enough strategically placed Republicans abstain that Trump does not win (although a majority of the House by numbers almost certainly votes for Trump). Ryan is sworn in as Acting President on January 21.
Actually, the Senate would vote for VP between say Kaine and Pence, and one of them would become Acting President until the House picked (if ever). Only if the Senate tied as well and for some reason Biden couldn't break a tie (death, resignation, etc) would Ryan become Acting President I believe.