Finishing Directions for a Beginner!

I am knitting a simple baby hat and am confused by the instructions for finishing:

Cut the yarn, leaving a long tail.
Using the yarn needle, draw the yarn through the remaining stitches on the needle.
Pull tightly and secure the yarn.
Sew the back seam of the hat.
Sew in the loose ends.

I am just confused. So do I take the yarn off the needle and then pull the yarn through the loops? Or do I loop the yarn through while it is on the needle? I am just somewhat puzzled by their wording here.

Help is very much appreciated!!

You can thread the yarn on a tapestry or darning needle and pull it through the stitches as you take them off the knitting needle. It’s like you’re making a drawstring with the yarn, then you seam up the edges.

There’s a video here that shows you the steps for finishing the hat.