Ever since Chillingworth's return to town, and his discovery of Hester's sin, he has been on a mad quest to find out who the father is. Hester refuses to give up that information, so Chillingworth takes it upon himself to study the people of the town and find the guy. Pretty soon, he hones in on Dimmesdale; at first, he just becomes friends with him, but as their interactions become more frequent, he starts to suspect that Dimmesdale might be the man.
So, to confirm his suspicions, Chillingworth becomes Dimmesdale's personal doctor; he follows him, he analyzes his every move, he brings up conversations that would lend themselves well to a confession. He even moves into Dimmesdale's quarters to look for clues there. He is almost positive that Dimmesdale has the secret of his affair with Hester and fatherhood to Pearl buried deep inside his heart; he takes it up as his personal mission to find out for sure.
I hope that helps; good luck!