Governor Winthrop passed away that evening, and Hester tells Dimmesdale: "I have been watching at...Governor Winthrop's death-bed, and have taken his measure for a robe." So, she had been offering comfort and support during the Governor's illness and passing, and after he died, she took his measurements so that she could go home and make him a robe for his burial. Her good works for much of the book were in play even this evening in play. Dimmesdale is at the scaffold, tormenting himself as usual, and he speaks with Hester and Pearl as they are headed home. I put a link to a more complete chapter summary below. I hope this helps!
Hester has been sitting at Governor Winthrop's deathbed, sewing a burial shroud for him. When she and Pearl are returning home late at night, they find Dimmesdale standing on the scaffold. It is at this time that the mysterious scarlet letter appears in the dark sky.