The answer to this one is fairly simple. If a candidate dies (or becomes incapacitated) before election day – which is 3 November this year – their party picks a replacement to be on the ballot.
This does not have to be the vice presidential candidate on the ticket.
Both the Democrats and the Republicans have rules for how this candidate should be chosen.