i'm sure there are all sorts of tutorials for gift-bag making all over the internets but here is my non-professional take on it. i never measure, rarely pin and just go with the flow...here's how, have fun!
grab yourself a rectangular piece of fabric that looks like the right size when it is folded in half vertically. give it a press with your iron to chase them wrinkles out and flip over so the right side is facing down.
fold up a tiny smidge of an edge and press in place with a hot iron. next up, fold that fold over about a half inch and press as well. lookie there, you have a pretty folded edge that will become your casing when it is stitched down.
bring your happy piece over to your sewing machine. thread your machine with whatever happy color you like. i like to make my bobbin neutral with my thread something bright that will easily be seen as i stitch. pop your piece in with the folded edge, fold side up under your sewing machine foot. point it either left or right, depending on your comfort-zone. line up the top of the fold with the side of the foot making sure to overlap the other side of the flipped fabric as well and do a couple stitches back and forth before heading to the other end. conclude with a series of more backstitches. about an inch's worth. i like to use a 2 1/2 length stitch...whatever that means, it is small but not too tiny.
remove from machine and snip threads. fold in half right sides facing in and pop it back into your machine using your foot as a guide and making sure you have two pieces of fabric being stitched together. pin in place if you think you need it. beginning from just under the top hem you stitched up, power down on your pedal and do a couple of backstitches before zooming down to the bottom of the bag. slow down a little as you near the bottom and arc your stitches out to make a curve of sorts. stitch along the bottom of your bag to where your fabric ends at the fold and backstitch into place.
remove from machine, trim threads and the excess fabric outside your stitching. next up, cut a length of twine, string, yarn or thin ribbon that is about three times the width of your bag. make a knot in one end and poke it with a safety pin.
gently guide safety pin into the casing you stitched at the top of the bag. scrunch and pull until you have threaded the safety-pinned thread all the way around the casing. remove pin and tie ends together with a nice tight knot, turn right side out and viola! you are finished! now go make some more and have fun! handmade gift bags make excellent gifts, they are reusable and pretty to boot. you can make them as tiny as you like or as large as you like, just adjust the size of your casing and the ribbon you use. you can leave your ends untied as long as you knot them larger than the casing opening or add charms or buttons to the ends so the threads don't slip back into the casing.