If you are ripping it out and restarting every time you see this..STOP! That loop often goes way after a few rows on it's own, but getting the correct tension takes lots of practice. Cast on however many you want then start knitting.
Stockinette (knit a row, purl a row repeating) curls naturally so if you want it to lay flat you'll need to have the first several rows and the sides in garter stitch which is all knit stitches.
BTW.. I sometimes get a larger loop even now at the end of the first row, but it always seems to go away.