If enough members of the electoral college don't vote for Donald Trump, which they can and may do, and no Presidential candidate receives the mandatory 270 of Electoral votes needed to be declared President per the Constitution, then the House of Representatives elects the President from the 3 Presidential candidates who received the most Electoral votes.
Each state delegation has one vote.
The Senate would elect the Vice President from the 2 Vice Presidential candidates with the most Electoral votes.
Each Senator would cast one vote for Vice President.
If the House of Representatives fails to elect a President by Inauguration Day, the Vice-President Elect serves as acting President until the deadlock is resolved in the House.
This has happened once before, in the Presidential election of 1836, when the election for Vice President was decided in the Senate.
Martin Van Buren’s running mate, Richard M. Johnson, fell one vote short of a majority in the Electoral College. Vice Presidential candidates Francis Granger and Johnson had a “run-off” in the Senate under the 12th Amendment, where Johnson was elected 33 votes to 17.