Brand spankin new to knitting

I have been crocheting for about 3 years and decided to try knitting yesterday, I watched a few YouTube videos and learned the knit stitch and the purl stitch. I’m making a scarf to experiment with the two stitches, I started the scarf by casting on 24 and just doing one row knit and one row purl for about 10inches and for the past two inches I have been doing one knit one purl etc. for the row, and the next row do the opposite, but for some reason the sides just keep curling in. It doesn’t feel like I am knitting too tightly, is thee something special I should be doing with the first stitch and last?

Welcome to Knitting Help!

What you’re doing is called stockinette and that’s what it does. Sometimes you can do a border and it will help, but a very narrow scarf may still curl a little. Look in the How-to Forum and there is a sticky thread at the top of the page about it.

Doing something with the edge stitches won’t keep it from curling up - it’s the stockinette stitch of knit one row, purl the other that makes it does that. Here’s the technical explanation with links to her solutions. We also have a thread on that.

Short answer - you need to work the first few rows and the edge stitches in garter (knit on both sides) or seed stitch to help tame the curling.