Foreign powers and populists
In Federalist #68, Alexander Hamilton laid out the reasons why electors should switch their vote. The founders feared bad candidates unduly influenced by foreign powers, and demagogues. Trump is unabashedly both. He criticizes our own CIA claiming what every American knows, that Russia interfered in our election. Trump is the worst sort of populist demagogue, offering no solution to problems other than he'll be a strong leader.
Therefore, electors have good reasons to change their votes. I'm not suggesting they should, only that doing so is consistent with our Constitutional principles and history.
So if 10% of Trump's electors defect, how would this actually work?
Failure to get 270 vote absolute majority (math)
Well, to start with, let's count up the number of electors. Each state gets one elector for every House Representative and each Senator. Since there are 435 members of the House and 100 members of the Senate, that comes out to 535. However, the 23rd Amendment adds three more electors for Washington D.C. (so they can vote in the Presidential election but not Congress). So that means the there are 538 total electors.
According to the Constitution, the winner must get an absolute majority, meaning over 50% of the electoral votes cast. Half of 538 is 269, plus one to get more than half to get majority, equals 270. Thus, Trump must get at least 270 electoral votes. If he gets only 269, the election fails.
Trump won 306 electors in the election. To get below 270, then 37 electors must switch their votes, which is a little over 10%.
Electors are free to change their votes
Constitutionally, the electors are free to change their votes. However, for most, it would destroy their political careers. Most are state party people who have spent years building up power and reputation in their respective states. Violating their word would destroy all that -- nobody would trust them again. They would certainly never be chosen as an elector again, of course.
Many states have laws against electors changing their votes. It is widely accepted that these laws are unconstitutional and would be struck down the courts, but in the meanwhile, some vote flippers would have to spend considerable time and money defending themselves from the legal punishment.
Electors vote December 19
We've only got until December 19th [*] for electors to change their minds. That's the date they vote. The votes are collected in their various states, then sent to Washington.
Electoral votes counted January 6
Ballots are theoretically sealed until January 6, when the votes are unsealed and counted in front of Congress.
A 26 state majority of House delegations
If the elector college fails to get an absolute majority of 270 votes, then the election is thrown into the House of Representatives. But it's not a straight up vote among all 435 members of the House. Instead, there are 50 votes -- one for each state delegation. Again, the winner must get an absolute majority to win, meaning 26 votes.
This will be the newly elected House of Representatives, which will have been sworn in on January 3, three days earlier. They are instructed to immediately vote, right after the counting of electoral votes fails to deliver a result.
This is where things get a little weird, because the state "delegation", all the house members from a state, must decide on the vote for their state. The vote is determined by the majority of representatives from each state.
In the outgoing Congress, the Republicans have the most Representatives in the House, with 247 members to the Democrats 188 members. But the question is how many delegations they have, which can be completely different. It's plausible to have the majority of Representatives and a minority of state delegations. As it turns out, Republicans do have the majority of state delegations, by a 2 to 1 margin, 32 to 16 (with 2 states a tie). These are the old numbers I find on Wikipedia [*], but the next Congress will have substantially the same makeup. Update: According it @KDbyproxy, the incoming congress numbers are 32-17-1, but I haven't verified the numbers myself.
So, if the electoral college can't make a decision, then the Republicans will have a 2 to 1 majority in the House, and could easily elect Trump. However, in this case there's no expectation that they would vote for Trump. While Republicans certainly wouldn't vote for Hillary, they could vote for a third candidate.
According to the Constitution, the Representatives will vote for the the top 3 recipients of electoral votes, meaning Trump, Hillary, and whoever got the most votes among the "Hamilton electors".
Here's where a bunch of Hillary electors are threatening to defect. They are proposing to vote in a bloc for John Kasich instead, the most moderate of the viable Republican candidates (Kasich was #4 in the 2016 Republican primary).
This will give the House a choice between Trump, Hillary, and Kasich. Presumably, all the Democrats would then vote for Kasich, giving him 16 of the needed 26 votes immediately. Then, the Democrats would need to swing another 10 state delegations to Kasich's side. Since in many state delegations, Republicans hold only a slim majority, and only a few individuals would need to swing their votes, this is not so large a hurdle. Since there's a good chance many Republicans will prefer Kasich over Trump anyway, this seems a likely outcome. After all, Trump didn't even win the popular vote in the main election (just the electoral vote), so there's no "mandate" or anything that says they must vote for Trump.
According to the rules, the House must vote immediately after the electoral count fails to produce a winner. That doesn't give much time for them to scramble for votes. In practice, we'll probably know on December 19th how the vote went, in which case they'll have plenty of time to know what's coming and to horse trade for votes ahead of time.
If House fails, new VP becomes acting President
What happens if the House doesn't give any candidate 26 votes? In that case, whoever was elected as the new Vice President will become the acting President.
That means Mike Pence, Trump's running mate, who won 306 electoral votes for VP. However, the same deal can apply, with 37 electors defecting and voting for a different VP. Instead of going to the house, the vote now goes to the Senate for the top two candidates. Since the top two will certainly be Tim Kaine (Hillary's running mate) and Mike Pence, and the Senate is solidly Republican, that again means Pence would be elected VP, and hence, become Acting President in case the House fails to vote on a candidate.
One elector, Christopher Suprun, has promised to be a "Hamilton Elector" and not vote for Trump. If 36 more electors do the same, then there's a good chance Trump won't become president. The winner won't be Hillary, but some other Republican, at least Pence, and maybe John Kasich. Kasich has come out publicly and told electors not to vote for him [*], but we'll see what happens.
36 more electors is a long shot, but then, Trump winning was considered a long shot in the first place. Moreover, Trump has been acting so badly since the election that he's giving electors good reason to switch their votes. You'd think that as a reasonable person, he'd at least stop tweeting until December 19th.
So here's the timeline:
- December 19: electors vote, 37 needed to defect from Trump
- January 3: new congress sworn in
- January 6: electoral votes counted, House conducts first vote
- January 20: President or Acting President (new VP) sworn in
Update: Previous version said the House had until March to decide. This was a clause from the 12th Amendment that apparently was superceded by the 20th. See! This is why constitutional scholars need to do this work, not hackers!!