There are two kinds of election, that is, with or without an incumbent running for reelection.
When there is an incumbent running for reelection, then the first thing the voters will do is to evaluate the performance of the incumbent, rather than the prospect of the challenger.
So, if the incumbent is doing a good job, and deserve another 4 years, then, even if the challenger is very sharp, the incumbent will still win.
On the othe rhand, if the incumbent is disappointing, and has to be replaced, then, even if the challenger is a playboy or a woman, the incumbent will still lose. In such a situation, attacking the challenger usually will not be able to save the incumbent at all.