And what if it's a tie?. The representative of each state is supposed, of course, to cast his electoral college votes for the candidate that his state tells him to. So, the states, if everything goes to plan , might vote so that the end total for each candidate is exactly the same, a tie But not every state has a law saying that their man must do what they tell him. If any man goes rogue, and doesn't comply, what would have been properly a tie is suddenly won by the candidate he defects to, against orders!
That 'going rogue' has happened in the past, but not with that result.
Otherwise, if it is indeed a tie, the House of Representatives chooses the President and the Senate the Vice - President. That would make Romney President, because the Republicans have a majority in that house, and Joe Biden the Vice President, because the Democrats have a majority in that house.