When knitting curls in on itself, it’s usually a result of having significantly more knit stitches than purl stitches on one side of the knitted fabric.
It can help to add a textured border to your work. Adding a little garter stitch or seed stitch edge can help a lot, especially if your work is relatively narrow.
Another option is to slip a stitch at the beginning of each row. This doesn’t have the most significant effect, but slipping a stitch at the beginning of the row can still help.
Sometimes, the cast on method is too loose or too tight, and exacerbates the curling. Experimenting with different methods can help to see if the cast on contributes to the curled knitting.
Blocking your knits is one of the single most effective things you can do to reduce the likelihood that your work will curl in on itself.
If you have a flat piece of stockinette that is curling in on itself, sometimes applying a knit-on border after the fact can help add some weight and stability to the work.