I have knitted a scarf half way thru and it has curled from the sides. I have placed heavy books acrossed it which hasn’t helped much. How can I get the curl out so that it lays flat?
You won’t if you did it in stockinette stitch - knit one row, purl the other - it always wants to curl into a tube. You can counteract that somewhat by knitting the edge stitches in garter or seed stitch, sometimes by steaming.
The simple fact is that stockinette curls. Non curling borders can help some, but they aren’t perfect either. They sometimes fold over into the stockinette. Here’s a few links that may help along with other suggestions you get.
These are all about combating the curl whether it’s a button band or whatever so there are various suggestions and more links at the bottom of the article.