The party would nominate a new successor to the candidate. Such was the case when Robert Kennedy was assassinated before the general election. The party then had to put forth a new nominee (I apologize that I can't remember the new nominee's name off-hand). This situation also happened in a foreign country with Benazir Bhutto's assasination. The country then had her son represent her in the election.
Now if a candidate wins the election and dies while they are in the President-elect status (the time between the election and January 19th when they are sworn in), then the elected Vice President would become the President as is set forth by the Constitution.


