To cast off, knit the first two stitches, then insert the left-hand needle into the first stitch. Draw it over the second stitch and off the needle; one stitch remains on the right hand needle. Knit the next stitch, and then pull the first stitch over the second and off the needle as before. Repeat until one stitch remains, then cut the yarn, leaving a tail, and draw this tail through the last stitch to secure the work.
It is important to cast off loosely when knitting a sweater; there needs to be some give in the work so that the wearer's head fits comfortably through the neck hole. Using larger needles helps prevent the stitches from becoming too tight.
For greater flexibility, try an alternative casting off method such as the decrease bind off. This gives greater stretch than the standard cast off method. Knit the first two stitches through the back of the loop: the right-hand needle goes into the back of the stitches from right to left; the yarn is then wound anti-clockwise around the needle. Return the resulting stitch to the left-hand needle, and start again. Repeat until one stitch remains, and then bind off.