Endonucleases extract damaged DNA, whereas exonucleases remove mismatched or damaged nucleotides during DNA repair.