The US constitution imposes a final deadline - the term of the president (and vice-president) expires on 20 January at noon.
If Congress has been unable to choose the winner by then, there's a line of succession set out in law.
First in line is the Speaker of the House of Representatives, currently Nancy Pelosi, followed by the second highest ranking member of the Senate, currently Charles Grassley.
This has never happened before so it's unclear how, under these exceptional circumstances, this would work in practice.