My scarves curl up

how do you get the edges not to curl up?

If they’re in stockinette - knit one row, purl another - that’s why. You can put a border on it, knit or crochet, or knit one in that’s about 4-5 sts in garter at the beginning and end of each row plus about 6 rows at the start and end of it. It’s been thoroughly discussed and more suggestions on this thread