This stanza actually is the fourth in the poem and is part of the first section. It comes before the mariner actually begins narrating his tale to the wedding guest, and thus is part of the framing narrative, or the story in which the second (embedded) story of the mariner and the albatross is told. It is said by the narrator as he describes how the mariner manages to mesmerise the wedding guest with his words with a strange and curious fascination that makes him willing to listen to the story rather than press on to the wedding that he is invited to. Let us have a look at the stanza:
He holds him with his glittering eye -
The Wedding-Guest stood still,
And listens like a three years' child:
The Mariner hath his will.
Note the simile that describes the wedding guest as a "three years' child" listening to the mariner as he weaves his tale. There is clearly a curious intensity in the mariner that draws the wedding guest in and then keeps him there captive whilst he hears the mariner's story.