My scarf is curling

I am new to knitting and taught myself. I am working on a scarf. The pattern calls for knitting one row then on the next to knit 6, purl 6, knit 6, purl 6, knit 6. My purled sections are puffing out and the knit rows curl under. What do I need to do to get it to stay flat? If I lay it out it will lay flat but as soon as I pick it up it curls back up. Am I switching from stitch to stitch wrong or is it a tension issue? Any help you can give would be wonderful!
Thank you!

It should even out more as you make it longer. If you have a wool yarn, you may be able to block the edges flat when you’re done. Give it a few more inches and see how it behaves then. A tighter tension will tend to curl a bit more than a looser one, so notice if you’re tight or not.

Thanks so much!! I will go a bit longer and see what happens :]