There are several ways of sewing up your knitting, but a common one is the invisible seam (or mattress stitch) which produces a neat finish and is useful if you need to match up patterns on the garment as the right side is facing you as you work.
On the left hand piece of knitting, pull the edge stitch slightly away from the stitch next to it. You will see a horizontal bar running between the edge stitch and its neighbour. Thread the needle using the tail yarn from your cast on and insert the needle under that bar.
Pull the yarn through the bar (it doesn't have to be pulled tightly just yet) and then insert the needle under the parallel horizontal bar on the opposite piece.
Work back and forth, inserting the needle under the bar on one piece then the other piece until you've worked a few rows.
Gently but firmly pull the yarn in the direction of the seam (rather than out towards you) and the two rows of second stitches will start to cosy up to one another. Stop pulling on the yarn before the seam starts to pucker. Adjust as necessary so that the seam lays flat and neat. Continue until you reach the top of the pieces. Finish off by connecting the top two corner stitches like you did at the lower edge and weave the remaining yarn in securely on the wrong side.