1. The incoming (newly-elected) House votes on the President. But they don't take a straight up or down vote. Instead, each state's delegation gets a vote. So California, which has 53 representatives, gets one vote based on what a majority of those representatives decide. Delaware, which has just one representative, also gets one vote. In order to win the Presidency, a candidate must receive the votes of an outright majority of 26 state delegations. This is more difficult than you might think, because delegations with an even number of members can be split, and a couple probably will be -- right now Arizona has four Republican representatives and four Democratic ones, for instance.
2. If no candidate receives a majority of the House delegations, the House is supposed to continue voting until one does. But naturally, the Constitution provides for a default option if the House is unable to come to agreement. That is because the incoming Senate votes on the Vice President, and the Vice President becomes the acting President if no President is chosen by the House by Inauguration Day.
3. A tie is also possible in the Senate, since the outgoing Vice President (Dick Cheney) does not get a vote under the 12th Amendment. In fact, if the Senate held such a vote today, a tie would be somewhat likely, assuming that Bernie Sanders voted with the Democrats and Joe Lieberman voted for John McCain. If the House hasn't picked a President and the Senate hasn't picked a Vice President, succession defaults to the Speaker of the House ... which means we'd have President Pelosi.