I knitted a scraf and the sides are curling and I don't know what to do
When I knit scarves I add 3 to 5 stitches in moss stitch on each side to prevent rolling.
For the scarf you have now you could try crocheting a decorative stitch along the sides.
A gentle press can take out the roll but be careful not to "kill" the yarn. To do this, put one or two fluffy towels on an ironing board. place as much of the scarf as you can on the towels and smooth the scarf out with your hands, pinning if necessary. Put another fluffy towel over the scarf. With a steam iron, heat the top towel by hovering the iron at about one inch. Heat well. Leave alone for about 30 minutes or until cold and dry. Repeat for the other end.
Another thing you can try is wet blocking. Same as above only wet the scarf thoroughly, wrap in a clean dry towel and stand on the roll to gently squeeze out most of the water. Do as above and let it dry, usually overnight.