On that top picture, it looks like you haven't knitted the last stitch yet.
It's a good habit to count your stitches after every row when you first start knitting, and even long after that if you're working a complicated pattern. If you know you had 25 at the beginning, and you have 26 or 24 at the end, you can go back and fix the mistake without ripping out a bunch of rows.
Another good habit: mark the right side of your work, or, if it's all garter stitch, one side. You can use a safety pin, hairpin, piece of contrast-color yarn--it doesn't matter. That way when you have to set your work down, you can remember you were working on the side with the safety pin, or what have you.
I forget who, but someone here pointed out that your working yarn will always come off the last stitch you worked. If you're right-handed, it'll be the last stitch on your right needle.