If a winning candidate dies after the election in November AND after the Electoral College votes in December then his running mate will be sworn in as President. After being sworn in he would then choose a Vice President who would then have to be confirmed by both Houses of Congress.
Here's where it gets tricky, though!
If a candidate wins on election day in November and then dies before the Electoral College counts the votes in December, then there is a problem! Technically the electors can already vote for whomever they want to even if the candidate is alive. So the most likely outcome with a death is that the electors would decide who would become president. Obviously the party of the candidate would have something to say about who they should vote for. But the electors would not be bound by the party's opinion. The best outcome would be for all the dead candidate's electors to come together and choose who to vote for in a single block. But that is complicated by the fact that the electors never really all come together at all -- the electors vote in their individual state capitals, not in one big group.