I think that you are talking about the scaffold episode that happens in Chapter 23. If that is correct, then the person who approaches Dimmesdale when he tries to mount the scaffold is Roger Chillingworth. He tries to prevent Dimmesdale from doing that and, more importantly, from acknowledging that Pearl is his child and that he was the one with whom Hester committed adultery.
In my opinion, Chillingworth does this because he wants to maintain his hold over Dimmesdale. If Dimmesdale confesses in front of everyone, Chillingworth will no longer have anything to hold over his head. He will have no way of torturing Dimmesdale. He wants to keep doing that and so he tries to prevent Dimmesdale from confessing.
Dimmsdale is Hester's husband in the play "The Crucible." He spent many years tormenting Dimmsdale but at the same time he may have also come to respect the man in other ways. I believe that he did not want to see Dimmsdale absolved for his sins. If Dimmsdale confessed his sin, then he could have been with Hester. Dimmsdale had already stopped that from happening once. For Dimmsdale, the idea of Hester, Pearl, and the Reverend living together would be the final slap in the face.
Dimmsdale is also somewhat a friend with the Reverend. They have shared this silent bond all the years, each one knowing the truth but never saying it aloud. They had a strange bond.