pohnpei397's answer is good.
All you really need to do, though, is read the opening paragraphs of the story for yourself. (The full text can be found in many places online, including the link below.) pohnpei's answer includes a direct reference to a thought that Young Goodman Brown has in paragraph seven of the story, including the line:
she's a blessed angel on earth; and after this one night I'll cling to her skirts and follow her to heaven.
The very next paragraph of the story, however, opposes this image of purity:
With this excellent resolve for the future, Goodman Brown felt himself justified in making more haste on his present evil purpose. He had taken a dreary road, darkened by all the gloomiest trees of the forest, which barely stood aside to let the narrow path creep through, and closed immediately behind. ...
On this dark journey, his "present evil purpose," Young Goodman Brown abandons both his wife (Faith) and his belief in all that is good (faith).
I assume that you are talking about what Young Goodman Brown expects towards the beginning of the story.
At that point, he knows he has to go out on this errand, but after that all will be well. What he says is that he figures that he will be able to go back to being with his wife. He will hold on to her skirts and follow her to heaven.
Of course, that his not what happens. Instead, he comes to distrust everyone in the village -- especially those who seem most pious. He loses his faith in people and in God.